Skip to content

Commit

Permalink
fix: Use UTC zone in timestamps
Browse files Browse the repository at this point in the history
  • Loading branch information
lukasz.gryzbon committed Apr 28, 2022
1 parent e5adb1f commit 8f6e303
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ package com.lsdconsulting.exceptionhandling.server.time

import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean
import org.springframework.context.annotation.Bean
import java.time.ZoneId
import java.time.ZonedDateTime

class DefaultTimeProviderConfiguration {
Expand All @@ -10,7 +11,7 @@ class DefaultTimeProviderConfiguration {
fun timeProvider(): TimeProvider {
return object : TimeProvider {
override fun get(): ZonedDateTime {
return ZonedDateTime.now()
return ZonedDateTime.now(ZoneId.of("UTC"))
}
}
}
Expand Down

0 comments on commit 8f6e303

Please sign in to comment.