public class DateTimeUtil extends Object
| Constructor and Description |
|---|
DateTimeUtil() |
| Modifier and Type | Method and Description |
|---|---|
static ZoneId |
chooseTimeZone(NativeContext.ServerContext serverContext) |
static LocalDateTime |
convertTimeZone(LocalDateTime localDateTime,
ZoneId from,
ZoneId to) |
static long |
toEpochMilli(ZonedDateTime zdt) |
static long |
toEpochSecond(ZonedDateTime zdt) |
static Timestamp |
toTimestamp(ZonedDateTime zdt,
ZoneId tz) |
static ZonedDateTime |
toZonedDateTime(long seconds,
int nanos,
ZoneId tz) |
static ZonedDateTime |
toZonedDateTime(Timestamp x,
ZoneId tz) |
public static ZoneId chooseTimeZone(NativeContext.ServerContext serverContext)
public static LocalDateTime convertTimeZone(LocalDateTime localDateTime, ZoneId from, ZoneId to)
public static long toEpochMilli(ZonedDateTime zdt)
public static long toEpochSecond(ZonedDateTime zdt)
public static ZonedDateTime toZonedDateTime(long seconds, int nanos, ZoneId tz)
public static ZonedDateTime toZonedDateTime(Timestamp x, ZoneId tz)
public static Timestamp toTimestamp(ZonedDateTime zdt, @Nullable ZoneId tz)
Copyright © 2021. All rights reserved.