Package org.apache.commons.lang3.time

# Class TimeZones

java.lang.Object
org.apache.commons.lang3.time.TimeZones

public class TimeZones extends Object
Helps to deal with `TimeZone`s.

Since:
  3.7

- ## Field Summary

  Fields
  Modifier and Type
  Field
  Description
  `static final TimeZone`
  `GMT`
  The GMT time zone.
  `static final String`
  `GMT_ID`
  A public version of `TimeZone`'s package private `GMT_ID` field.

- ## Method Summary

  Modifier and Type
  Method
  Description
  `static TimeZone`
  `toTimeZone(TimeZone timeZone)`
  Returns the given TimeZone if non-`null`, otherwise `TimeZone.getDefault()`.

  ### Methods inherited from class java.lang.Object

  `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- ## Field Details

  - ### GMT_ID

    public static final String GMT_ID
    A public version of `TimeZone`'s package private `GMT_ID` field.
    See Also:
      - Constant Field Values

  - ### GMT

    public static final TimeZone GMT
    The GMT time zone.
    Since:
      3.13.0

- ## Method Details

  - ### toTimeZone

    public static TimeZone toTimeZone(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