We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 94eb2df commit 7c5323eCopy full SHA for 7c5323e
src/main/kotlin/dev/hossain/time/InstantExtension.kt
@@ -1,5 +1,6 @@
1
package dev.hossain.time
2
3
+import dev.hossain.time.UserCity.NEW_YORK
4
import kotlinx.datetime.Instant
5
import kotlinx.datetime.toJavaInstant
6
import java.time.ZonedDateTime
@@ -9,7 +10,7 @@ import java.time.ZonedDateTime
9
10
*/
11
fun Instant.toZdt(): ZonedDateTime {
12
val javaInstant: java.time.Instant = this.toJavaInstant()
- return javaInstant.atZone(Zone.city("New York"))
13
+ return javaInstant.atZone(Zone.city(NEW_YORK))
14
}
15
16
/**
0 commit comments