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 |
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 |
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 |
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)
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-2012 Apache Software Foundation. All Rights Reserved.