org.apache.commons.lang3.time

## Class FastTimeZone

- java.lang.Object
- - org.apache.commons.lang3.time.FastTimeZone

-     public class FastTimeZone
      extends Object

  Faster methods to produce custom time zones.
  Since:
    3.7

- - ### Method Summary

    All Methods Static Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `static TimeZone` | `getGmtTimeZone()` Gets the GMT TimeZone.
    `static TimeZone` | `getGmtTimeZone(String pattern)` Gets a TimeZone with GMT offsets.
    `static TimeZone` | `getTimeZone(String id)` Gets a TimeZone, looking first for GMT custom ids, then falling back to Olson ids.

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

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

- - ### Method Detail

    - #### getGmtTimeZone

          public static TimeZone getGmtTimeZone()

      Gets the GMT TimeZone.
      Returns:
        A TimeZone with a raw offset of zero.

    - #### getGmtTimeZone

          public static TimeZone getGmtTimeZone(String pattern)

      Gets a TimeZone with GMT offsets. A GMT offset must be either 'Z', or 'UTC', or match (GMT)? hh?(:?mm?)?, where h and m are digits representing hours and minutes.
      Parameters:
        `pattern` - The GMT offset
      Returns:
        A TimeZone with offset from GMT or null, if pattern does not match.

    - #### getTimeZone

          public static TimeZone getTimeZone(String id)

      Gets a TimeZone, looking first for GMT custom ids, then falling back to Olson ids. A GMT custom id can be 'Z', or 'UTC', or has an optional prefix of GMT, followed by sign, hours digit(s), optional colon(':'), and optional minutes digits. i.e. [GMT] (+|-) Hours [[:] Minutes]
      Parameters:
        `id` - A GMT custom id (or Olson id
      Returns:
        A time zone

Copyright © 2001–2021 The Apache Software Foundation. All rights reserved.