Skip to content

Commit 7d592e6

Browse files
committed
Fikset tidssone håndtering i testene
1 parent 3b59a2c commit 7d592e6

File tree

1 file changed

+1
-1
lines changed
  • apps/bekreftelse-tjeneste/src/test/kotlin/no/nav/paw/bekreftelsetjeneste/testutils

1 file changed

+1
-1
lines changed

apps/bekreftelse-tjeneste/src/test/kotlin/no/nav/paw/bekreftelsetjeneste/testutils/TestUtils.kt

+1-1
Original file line numberDiff line numberDiff line change
@@ -188,7 +188,7 @@ fun setOppTest(
188188
val Int.dager: Duration get() = Duration.ofDays(this.toLong())
189189
val Int.timer: Duration get() = Duration.ofHours(this.toLong())
190190
private val format = DateTimeFormatter.ofPattern("dd.MM.yyyy HH:mm")
191-
val String.timestamp: Instant get() = LocalDateTime.parse(this, format).atZone(ZoneId.systemDefault()).toInstant()
191+
val String.timestamp: Instant get() = LocalDateTime.parse(this, format).atZone(ZoneId.of("Europe/Oslo")).toInstant()
192192
private val prettyPrintFormat: DateTimeFormatter = DateTimeFormatter.ofPattern("cccc dd.MM.yyyy HH:mm ('uke' w)")
193193
val Instant.prettyPrint: String get() = LocalDateTime.ofInstant(this, ZoneId.systemDefault()).format(prettyPrintFormat)
194194
.replace("Monday", "Mandag")

0 commit comments

Comments
 (0)