public class DateTimeUtils extends Object
| Modifier and Type | Method and Description |
|---|---|
static Date |
getDate(Instant instant,
ZoneId zoneId) |
static LocalDateTime |
getLocalDateTime(Instant instant,
ZoneId zoneId) |
static OffsetDateTime |
getOffsetDateTime(Instant instant,
ZoneId zoneId) |
static Time |
getTime(Instant instant,
ZoneId zoneId) |
static Timestamp |
getTimestamp(Instant instant,
ZoneId zoneId) |
static ZonedDateTime |
getZonedDateTime(Instant instant,
ZoneId zoneId) |
static Date |
parseDate(String timestampStr,
ZoneId zoneId) |
static Time |
parseTime(String timestampStr,
ZoneId zoneId) |
static Timestamp |
parseTimestamp(String timeStampStr,
ZoneId zoneId) |
static Instant |
parseTimestampColumnData(long value,
int timestampPrecision) |
static Instant |
toInstant(Timestamp timestamp,
Calendar cal) |
static Instant |
toInstant(Timestamp timestamp,
ZoneId zoneId) |
static Long |
toLong(Instant instant,
int precision) |
static Long |
toLong(LocalDateTime localDateTime,
ZoneId zoneId,
int precision) |
static Long |
toLong(OffsetDateTime offsetDateTime,
int precision) |
static Long |
toLong(Timestamp timestamp,
ZoneId zoneId,
int precision) |
static Long |
toLong(ZonedDateTime zonedDateTime,
int precision) |
public static Time parseTime(String timestampStr, ZoneId zoneId) throws DateTimeParseException
DateTimeParseExceptionpublic static Long toLong(LocalDateTime localDateTime, ZoneId zoneId, int precision)
public static Long toLong(ZonedDateTime zonedDateTime, int precision)
public static Long toLong(OffsetDateTime offsetDateTime, int precision)
public static Instant parseTimestampColumnData(long value, int timestampPrecision)
public static LocalDateTime getLocalDateTime(Instant instant, ZoneId zoneId)
public static OffsetDateTime getOffsetDateTime(Instant instant, ZoneId zoneId)
public static ZonedDateTime getZonedDateTime(Instant instant, ZoneId zoneId)
Copyright © 2026. All rights reserved.