List of utility methods to do ZonedDateTime Create
ZonedDateTime | toZonedDateTime(@Nullable Date date, @Nullable TimeZone zone) Convert the given Date to a ZonedDateTime at the given TimeZone if (date == null || zone == null) return null; return ZonedDateTime.ofInstant(date.toInstant(), zone.toZoneId()); |
ZonedDateTime | toZonedDateTime(Date utilDate) to Zoned Date Time if (utilDate == null) { return null; final ZoneId systemDefault = ZoneId.systemDefault(); return ZonedDateTime.ofInstant(utilDate.toInstant(), systemDefault); |
ZonedDateTime | toZonedDateTime(long epochSeconds) to Zoned Date Time Instant instant = Instant.ofEpochSecond(epochSeconds);
ZonedDateTime datetime = ZonedDateTime.ofInstant(instant, ZoneId.systemDefault());
return datetime;
|
Object | toZonedDateTime(long systemMillis) Return the system millis time as a ZonedDateTime. return ZonedDateTime.ofInstant(Instant.ofEpochMilli(systemMillis), ZoneId.systemDefault());
|
ZonedDateTime | toZonedDateTime(Object cell) to Zoned Date Time return ZonedDateTime.ofInstant(Instant.ofEpochMilli(toLong(cell)), ZoneId.systemDefault());
|
ZonedDateTime | zonedDateTime(String date, ZoneId zoneId) zoned Date Time return ZonedDateTime.of(LocalDateTime.parse(date, formatter), zoneId);
|
ZonedDateTime | zonedDateTimeOf(final ZonedDateTime time) Utility for creating a ZonedDateTime object from a ZonedDateTime. return ZonedDateTime.from(time);
|
String | zonedDateTimeToYyyyMMdd(LocalDate localDate) zoned Date Time To Yyyy M Mdd if (localDate == null) { return null; return localDate.format(DateTimeFormatter.ofPattern("yyyy-MM-dd")); |