Skip to content

Commit

Permalink
[CLEANUP] Re-use constant defined
Browse files Browse the repository at this point in the history
  • Loading branch information
hossain-khan committed Dec 23, 2024
1 parent 94eb2df commit 7c5323e
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/main/kotlin/dev/hossain/time/InstantExtension.kt
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
package dev.hossain.time

import dev.hossain.time.UserCity.NEW_YORK
import kotlinx.datetime.Instant
import kotlinx.datetime.toJavaInstant
import java.time.ZonedDateTime
Expand All @@ -9,7 +10,7 @@ import java.time.ZonedDateTime
*/
fun Instant.toZdt(): ZonedDateTime {
val javaInstant: java.time.Instant = this.toJavaInstant()
return javaInstant.atZone(Zone.city("New York"))
return javaInstant.atZone(Zone.city(NEW_YORK))
}

/**
Expand Down

0 comments on commit 7c5323e

Please sign in to comment.