public class NanoTimeUtils extends Object
| Constructor and Description |
|---|
NanoTimeUtils() |
| Modifier and Type | Method and Description |
|---|---|
static NanoTime |
getNanoTime(Timestamp ts,
ZoneId sourceZone,
boolean legacyConversion)
Converts a timestamp from the specified timezone to UTC and returns its representation in NanoTime.
|
static Timestamp |
getTimestamp(NanoTime nt,
ZoneId targetZone) |
static Timestamp |
getTimestamp(NanoTime nt,
ZoneId targetZone,
boolean legacyConversion)
Converts a nanotime representation in UTC, to a timestamp in the specified timezone.
|
public static NanoTime getNanoTime(Timestamp ts, ZoneId sourceZone, boolean legacyConversion)
public static Timestamp getTimestamp(NanoTime nt, ZoneId targetZone, boolean legacyConversion)
legacyConversion - when true the conversion to the target timezone is done with legacy (backwards compatible)
method.Copyright © 2022 The Apache Software Foundation. All rights reserved.