Skip to content

Commit

Permalink
Use unix time in token availability check
Browse files Browse the repository at this point in the history
  • Loading branch information
Isti01 committed Mar 16, 2024
1 parent 967071e commit 7ea5217
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ import org.springframework.retry.annotation.Retryable
import org.springframework.stereotype.Service
import org.springframework.transaction.annotation.Isolation
import org.springframework.transaction.annotation.Transactional
import java.time.Instant
import java.util.*
import kotlin.jvm.optionals.getOrNull

Expand Down Expand Up @@ -153,7 +154,7 @@ open class TokenCollectorService(
clock.inRange(
tokenEntity.availableFrom ?: 0,
tokenEntity.availableUntil ?: Long.MAX_VALUE,
clock.getTimeInSeconds(),
Instant.now().epochSecond,
)


Expand Down

0 comments on commit 7ea5217

Please sign in to comment.