public final class JavetDateTimeUtils
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
static java.time.ZoneId |
ZONE_ID_UTC
The constant ZONE_ID_UTC.
|
Modifier and Type | Method and Description |
---|---|
static java.time.ZonedDateTime |
getUTCNow()
Gets utc now.
|
static java.time.ZonedDateTime |
toZonedDateTime(long jsTimestamp)
From JS timestamp to zoned date time.
|
static java.time.ZonedDateTime |
toZonedDateTime(long jsTimestamp,
java.time.ZoneId zoneId)
From JS timestamp to zoned date time.
|
public static java.time.ZonedDateTime getUTCNow()
public static java.time.ZonedDateTime toZonedDateTime(long jsTimestamp, java.time.ZoneId zoneId)
jsTimestamp
- the JS timestampzoneId
- the zone idpublic static java.time.ZonedDateTime toZonedDateTime(long jsTimestamp)
Note: the ZoneId needs to be system default because that's what V8 sees.
jsTimestamp
- the JS timestamp