Skip to content

Commit

Permalink
fix now for instant
Browse files Browse the repository at this point in the history
  • Loading branch information
sebastian-alfers committed Jan 9, 2024
1 parent db50fe0 commit 87e6001
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ import java.util.TimeZone
def encode(timestamp: Instant): Any
def decode(row: Row, name: String): Instant

protected def instantNow() = InstantFactory.now()
protected def instantNow(): Instant = InstantFactory.now()

def now[T](): T
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -591,7 +591,7 @@ private[r2dbc] class PostgresDurableStateDao(
limit: Int): Future[Seq[Bucket]] = {

val toTimestamp = {
val now = timestampCodec.now() // not important to use database time
val now = timestampCodec.now[Instant]() // not important to use database time
if (fromTimestamp == Instant.EPOCH)
now
else {
Expand Down

0 comments on commit 87e6001

Please sign in to comment.