Skip to content

Commit

Permalink
Erstattet ZoneId med ZoneOffSet
Browse files Browse the repository at this point in the history
  • Loading branch information
albrektsson committed Apr 26, 2023
1 parent 1bc3791 commit 74207d0
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion behov/src/main/kotlin/no/nav/k9/rapid/behov/Behovsformat.kt
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import com.fasterxml.jackson.databind.SerializationFeature
import com.fasterxml.jackson.datatype.jsr310.JavaTimeModule
import com.fasterxml.jackson.module.kotlin.jacksonObjectMapper
import java.time.ZoneId
import java.time.ZoneOffset
import java.time.ZonedDateTime
import java.time.format.DateTimeFormatter.ofPattern

Expand All @@ -29,7 +30,7 @@ object Behovsformat {
val BehovssekvensVersjon = "1"

private val ISO8601 = ofPattern("yyyy-MM-dd'T'HH:mm:ss.SSSX")
private val UTC = ZoneId.of("UTC")
private val UTC = ZoneOffset.UTC

fun nå() = ZonedDateTime.now(UTC)
fun ZonedDateTime.iso8601() = ISO8601.format(this)
Expand Down

0 comments on commit 74207d0

Please sign in to comment.