org.apache.solr.util

## Class TimeZoneUtils

- java.lang.Object
- - org.apache.solr.util.TimeZoneUtils

-     public final class TimeZoneUtils
      extends Object

  Simple utilities for working with TimeZones
  See Also:
    `TimeZone`

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `static Set<String>` | `KNOWN_TIMEZONE_IDS` An immutable Set of all TimeZone IDs supported by the TimeZone class at the moment the TimeZoneUtils was initialized.

  - ### Method Summary

    All Methods Static Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `static TimeZone` | `getTimeZone(String ID)` This method is provided as a replacement for TimeZone.getTimeZone but without the annoying behavior of returning "GMT" for gibberish input.

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

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

- - ### Field Detail

    - #### KNOWN_TIMEZONE_IDS

          public static final Set<String> KNOWN_TIMEZONE_IDS

      An immutable Set of all TimeZone IDs supported by the TimeZone class at the moment the TimeZoneUtils was initialized.
      See Also:
        `TimeZone.getAvailableIDs(int)`

  - ### Method Detail

    - #### getTimeZone

          public static final TimeZone getTimeZone(String ID)

      This method is provided as a replacement for TimeZone.getTimeZone but without the annoying behavior of returning "GMT" for gibberish input.

      This method will return null unless the input is either:

      - Included in the set of known TimeZone IDs
      - A "CustomID" specified as a numeric offset from "GMT"
      Parameters:
        `ID` - Either a TimeZone ID found in KNOWN_TIMEZONE_IDS, or a "CustomID" specified as a GMT offset.
      Returns:
        A TimeZone object corresponding to the input, or null if no such TimeZone is supported.
      See Also:
        `KNOWN_TIMEZONE_IDS`, `TimeZone`

Copyright © 2000-2016 Apache Software Foundation. All Rights Reserved.