List of utility methods to do TimeZone Create
TimeZone | codeToTimeZone(String tzString) code To Time Zone return stringToTimeZone(tzString);
|
Collection | getAvailableTimezones() get Available Timezones final Collection<TimeZone> tZones = new TreeSet<TimeZone>(new Comparator<TimeZone>() { @Override public int compare(TimeZone o1, TimeZone o2) { return o1.getID().compareTo(o2.getID()); }); for (String id : TimeZone.getAvailableIDs()) { tZones.add(TimeZone.getTimeZone(id)); ... |
TimeZone | getCurrentTimezone() Gets the current timezone of the computer (i.e. final TimeZone timezone = (TimeZone) currentTimezone.get(); return timezone != null ? timezone : TimeZone.getDefault(); |
long | getCurrentTimeZoneTime() Retrieves the current time in ms for the default timezone. return System.currentTimeMillis() - TimeZone.getDefault().getRawOffset();
|
TimeZone | getServerTimeZone() return the server timezone String timezone = System.getProperty("SERVER_TIMEZONE"); if (timezone == null) { return TimeZone.getDefault(); } else { return TimeZone.getTimeZone(timezone); |
TimeZone | getTimeZone() get default SimpleTimeZone (System Properties) return TimeZone.getDefault();
|
TimeZone | getTimeZone() get Time Zone return timeZone;
|
TimeZone | getTimeZone() Returns the time zone in use. return m_TimeZone;
|
String | getTimeZone() gets the timezone +/-{****}}, offset from GMT, try { int offset = TimeZone.getDefault().getRawOffset(); return calculateTimeZoneOffset(offset); } catch (Exception e) { return ""; |
TimeZone | getTimeZone() Get the default timezone used for formatting if (defaultTimeZone == null) { return TIMEZONE_UTC; return defaultTimeZone; |