Java Utililty Methods UTC TimeZone

List of utility methods to do UTC TimeZone

Description

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

Method

int_getUTCOffset()
get UTC Offset
TimeZone jiraTimeZone = TimeZone.getTimeZone("America/Los_Angeles");
return jiraTimeZone.getOffset(System.currentTimeMillis());
StringformatTimezoneOffsetFromUTC(TimeZone tz)
format Timezone Offset From UTC
return appendZZZZZ(tz.getRawOffset(), new StringBuilder(5)).toString();
TimeZonegetUTCTimeZone()
Retrieves a TimeZone object that represents the UTC (universal coordinated time) time zone.
return UTC_TIME_ZONE;
java.util.TimeZonegetUTCTimeZone()
get UTC Time Zone
if (utcTimeZone == null) {
    utcTimeZone = java.util.TimeZone.getTimeZone("UTC");
return utcTimeZone;
longlocalToUTC(long local)
Converts local time to UTC (GMT).
int offset = TimeZone.getDefault().getRawOffset();
return local - offset;
TimeZoneutc()
Returns a UTC timezone object.
return TimeZone.getTimeZone("UTC");
TimeZoneUTCTimeZone()
Returns the UTC time zone.
return TimeZone.getTimeZone(UTC_TIMEZONE_IDENTIFIER);