List of utility methods to do Calendar UTC
Calendar | getCalendarUTC() get Calendar UTC Calendar c = Calendar.getInstance(); System.out.println("current: " + c.getTime()); TimeZone z = c.getTimeZone(); int offset = z.getRawOffset(); if (z.inDaylightTime(new Date())) { offset = offset + z.getDSTSavings(); int offsetHrs = offset / 1000 / 60 / 60; ... |
Calendar | getCalendarUTC() Get a UTC calendar with Locale US. return new GregorianCalendar(UTC_TZ.get(), Locale.US); |
Calendar | getCalendarUTC(long timeMS) Get a new UTC calendar set to the given time. Calendar cal = getClaendarUTC(); cal.setTime(new Date(timeMS)); return cal; |
Calendar | getLocalCalendarFromUTC(Calendar utc) Get the equivalent UTC calendar to a local calendar Date valueDate = utc.getTime();
Calendar c = Calendar.getInstance();
c.setTime(valueDate);
return c;
|
Calendar | getUTCCalendar() get UTC Calendar return getCalendar(UTC, null);
|
Calendar | getUtcCalendar() Returns the instance of a {java.util.Calendar} with the UTC time zone and root locale. return Calendar.getInstance(TimeZone.getTimeZone("UTC"), Locale.ROOT); |
Calendar | getUTCCalendar() get UTC Calendar return Calendar.getInstance(TimeZone.getTimeZone("UTC")); |
Calendar | getUtcCalendar() get Utc Calendar return new GregorianCalendar(TIME_ZONE_UTC); |
Calendar | getUTCCalendar() Gets the UTC calendar. Calendar cal = Calendar.getInstance();
cal.setTimeZone(UTC_TIME_ZONE);
return cal;
|
Calendar | getUTCCalendar() get UTC Calendar if (parquetUTCCalendar.get() == null) { parquetUTCCalendar.set(Calendar.getInstance(TimeZone.getTimeZone("UTC"))); return parquetUTCCalendar.get(); |