From 23fceb8651b19fecc1b3f8f98f204fc89095730d Mon Sep 17 00:00:00 2001 From: Kellen Dye Date: Thu, 22 Aug 2024 17:23:21 -0400 Subject: [PATCH] lit --- shared/src/main/scala/magnolify/shared/Time.scala | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/shared/src/main/scala/magnolify/shared/Time.scala b/shared/src/main/scala/magnolify/shared/Time.scala index 4eaa69c5..7cad70ee 100644 --- a/shared/src/main/scala/magnolify/shared/Time.scala +++ b/shared/src/main/scala/magnolify/shared/Time.scala @@ -59,7 +59,7 @@ object Time { // micros ///////////////////////////////////////////////////// @inline def microsToInstant(microsFromEpoch: Long): Instant = { val epochSeconds = TimeUnit.MICROSECONDS.toSeconds(microsFromEpoch) - val nanoAdjustment = TimeUnit.MICROSECONDS.toNanos(microsFromEpoch % 1_000_000L) + val nanoAdjustment = TimeUnit.MICROSECONDS.toNanos(microsFromEpoch % 1000000L) Instant.ofEpochSecond(epochSeconds, nanoAdjustment) } @inline def microsFromInstant(instant: Instant): Long = { @@ -114,7 +114,7 @@ object Time { // nanos ///////////////////////////////////////////////////// // Long does not technically have enough range for Instant @inline def nanosToInstant(epochNanos: Long): Instant = - Instant.ofEpochSecond(TimeUnit.NANOSECONDS.toSeconds(epochNanos), epochNanos % 1_000_000_000L) + Instant.ofEpochSecond(TimeUnit.NANOSECONDS.toSeconds(epochNanos), epochNanos % 1000000000L) @inline def nanosFromInstant(instant: Instant): Long = TimeUnit.SECONDS.toNanos(instant.getEpochSecond) + instant.getNano @inline def nanosToJodaInstant(nanosFromEpoch: Long): joda.Instant =