Skip to content

Commit

Permalink
Review comments
Browse files Browse the repository at this point in the history
  • Loading branch information
malhotrashivam committed Nov 13, 2023
1 parent 2d6c00d commit fad7462
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
import org.jetbrains.annotations.Nullable;

import java.time.LocalDateTime;
import java.time.ZoneId;
import java.time.ZoneOffset;

/**
Expand All @@ -22,7 +21,8 @@ public static long epochNanosUTC(@Nullable final LocalDateTime localDateTime) {
if (localDateTime == null) {
return QueryConstants.NULL_LONG;
}
return DateTimeUtils.epochNanos(localDateTime.atZone(ZoneId.of("UTC")));
return DateTimeUtils.secondsToNanos(localDateTime.toEpochSecond(ZoneOffset.UTC))
+ localDateTime.toLocalTime().getNano();
}

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@
import java.time.LocalDateTime;
import java.time.ZoneId;


final public class TestTransferUtils {

@Test
Expand Down

0 comments on commit fad7462

Please sign in to comment.