List of utility methods to do TimeZone Usage
String | serializeTimeZone(TimeZone timeZone) Serialize a TimeZone . return timeZone.getID();
|
void | setBelarusTimeZone() set Belarus Time Zone TimeZone.setDefault(TimeZone.getTimeZone(TIME_ZONE_BELARUS)); |
TimeZone | stringToTimeZone(String tzString) string To Time Zone return TimeZone.getTimeZone(tzString != null ? tzString : ""); |
TimeZone | timeZone(String timeZoneEntry) time Zone TimeZone timeZone = TimeZone.getTimeZone(timeZoneEntry);
return timeZone;
|
TimeZone | timeZoneForCode(String timeZoneCode) time Zone For Code switch (timeZoneCode) { case "E": return TimeZone.getTimeZone("US/Eastern"); case "C": return TimeZone.getTimeZone("US/Central"); case "M": return TimeZone.getTimeZone("US/Mountain"); case "P": ... |
long | toDay(long millis) to Day return (millis + TimeZone.getDefault().getRawOffset()) / MILLIS_IN_DAY;
|
long | tzOffsetToQ(final long dt) tz Offset To Q return dt - TIME_ZONE.getOffset(dt - TIME_ZONE.getOffset(dt));
|
void | validateTimeZone(String timeZoneID) Check if the string id is a valid java TimeZone id. if (TimeZone.getTimeZone(timeZoneID).getID().equals("GMT") && !"GMT".equals(timeZoneID)) { throw new IllegalStateException( "Unexpected timezone id found for parquet int96 conversion: " + timeZoneID); |