Java Utililty Methods Calendar UTC

List of utility methods to do Calendar UTC

Description

The list of methods to do Calendar UTC are organized into topic(s).

Method

CalendargetCalendarUTC()
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;
...
CalendargetCalendarUTC()
Get a UTC calendar with Locale US.
return new GregorianCalendar(UTC_TZ.get(), Locale.US);
CalendargetCalendarUTC(long timeMS)
Get a new UTC calendar set to the given time.
Calendar cal = getClaendarUTC();
cal.setTime(new Date(timeMS));
return cal;
CalendargetLocalCalendarFromUTC(Calendar utc)
Get the equivalent UTC calendar to a local calendar
Date valueDate = utc.getTime();
Calendar c = Calendar.getInstance(); 
c.setTime(valueDate);
return c;
CalendargetUTCCalendar()
get UTC Calendar
return getCalendar(UTC, null);
CalendargetUtcCalendar()
Returns the instance of a {java.util.Calendar} with the UTC time zone and root locale.
return Calendar.getInstance(TimeZone.getTimeZone("UTC"), Locale.ROOT);
CalendargetUTCCalendar()
get UTC Calendar
return Calendar.getInstance(TimeZone.getTimeZone("UTC"));
CalendargetUtcCalendar()
get Utc Calendar
return new GregorianCalendar(TIME_ZONE_UTC);
CalendargetUTCCalendar()
Gets the UTC calendar.
Calendar cal = Calendar.getInstance();
cal.setTimeZone(UTC_TIME_ZONE);
return cal;
CalendargetUTCCalendar()
get UTC Calendar
if (parquetUTCCalendar.get() == null) {
    parquetUTCCalendar.set(Calendar.getInstance(TimeZone.getTimeZone("UTC")));
return parquetUTCCalendar.get();