Package com.day.util
Class TimeZoneUtil
java.lang.Object
com.day.util.TimeZoneUtil
The
TimeZoneUtil class provides convenience methods for handling
time zones in Java.- Since:
- echidna Audience wad
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic TimeZone[]Returns an array ofTimeZoneobjects sorted in ascending order by their UTC time offset.static StringgetDisplayName(TimeZone zone) Formats the passedTimeZoneobject to a String representation:static TimeZoneReturns theTimeZoneof the Communique server.
-
Constructor Details
-
TimeZoneUtil
public TimeZoneUtil()
-
-
Method Details
-
getAvailableZones
Returns an array ofTimeZoneobjects sorted in ascending order by their UTC time offset.- Returns:
- a sorted array of
TimeZoneobjects.
-
getServerTimeZone
Returns theTimeZoneof the Communique server.- Returns:
- the
TimeZoneof the Communique server.
-
getDisplayName
Formats the passedTimeZoneobject to a String representation:[<UTC offset>] <time zone name> (<short name>)Example: [UTC+01.00] Europe/Berlin (CEST)
- Parameters:
zone- TheTimeZoneto format- Returns:
- a
Stringrepresentation of the passedTimeZone.
-