Class TimeZones


  • public class TimeZones
    extends java.lang.Object
    Helps to deal with TimeZones.
    Since:
    3.7
    • Field Summary

      Fields 
      Modifier and Type Field Description
      static java.util.TimeZone GMT
      The GMT time zone.
      static java.lang.String GMT_ID
      A public version of TimeZone's package private GMT_ID field.
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static java.util.TimeZone toTimeZone​(java.util.TimeZone timeZone)
      Returns the given TimeZone if non-null, otherwise TimeZone.getDefault().
      • Methods inherited from class java.lang.Object

        equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • GMT_ID

        public static final java.lang.String GMT_ID
        A public version of TimeZone's package private GMT_ID field.
        See Also:
        Constant Field Values
      • GMT

        public static final java.util.TimeZone GMT
        The GMT time zone.
        Since:
        3.13.0
    • Method Detail

      • toTimeZone

        public static java.util.TimeZone toTimeZone​(java.util.TimeZone timeZone)
        Returns the given TimeZone if non-null, otherwise TimeZone.getDefault().
        Parameters:
        timeZone - a locale or null.
        Returns:
        the given locale if non-null, otherwise TimeZone.getDefault().
        Since:
        3.13.0