List of utility methods to do TimeZone Get
int | getTimeZoneOffset(long t) get Time Zone Offset Calendar c = getLocalCalendar();
c.setTimeInMillis(t);
return c.get(Calendar.ZONE_OFFSET) + c.get(Calendar.DST_OFFSET);
|
ArrayList | getTimezones() get Timezones return timezones;
|
long | getTimezoneTime(long time, int timezone) get Timezone Time Calendar calendar = getCalendar(time); int hour = calendar.get(Calendar.HOUR_OF_DAY); hour = (hour + timezone) % 24; if (hour < 0) { hour = 24 + hour; calendar.add(Calendar.DAY_OF_MONTH, -1); calendar.set(Calendar.HOUR_OF_DAY, hour); ... |
boolean | isValidTimeZoneId(String timeZoneId) Checks whether the given time zone id is valid for the other DateFormats used to parse dates in this util class. try { synchronized (TIME_ZONE_DATE_FORMAT) { TIME_ZONE_DATE_FORMAT.parse(timeZoneId); return true; } catch (ParseException e) { return false; |