diff --git a/core/src/main/scala/akka/persistence/r2dbc/internal/TimestampCodec.scala b/core/src/main/scala/akka/persistence/r2dbc/internal/TimestampCodec.scala index 0b422d37..de5713fd 100644 --- a/core/src/main/scala/akka/persistence/r2dbc/internal/TimestampCodec.scala +++ b/core/src/main/scala/akka/persistence/r2dbc/internal/TimestampCodec.scala @@ -21,7 +21,7 @@ import java.util.TimeZone def encode(timestamp: Instant): Any def decode(row: Row, name: String): Instant - protected def instantNow(): Instant = InstantFactory.now() + def instantNow(): Instant = InstantFactory.now() def now[T](): T } diff --git a/core/src/main/scala/akka/persistence/r2dbc/internal/postgres/PostgresDurableStateDao.scala b/core/src/main/scala/akka/persistence/r2dbc/internal/postgres/PostgresDurableStateDao.scala index 6e7c343c..748e6ccc 100644 --- a/core/src/main/scala/akka/persistence/r2dbc/internal/postgres/PostgresDurableStateDao.scala +++ b/core/src/main/scala/akka/persistence/r2dbc/internal/postgres/PostgresDurableStateDao.scala @@ -591,7 +591,7 @@ private[r2dbc] class PostgresDurableStateDao( limit: Int): Future[Seq[Bucket]] = { val toTimestamp = { - val now = timestampCodec.now[Instant]() // not important to use database time + val now = timestampCodec.instantNow() // not important to use database time if (fromTimestamp == Instant.EPOCH) now else {