Package com.ilib.tools.zic
Class Zone
- java.lang.Object
-
- com.ilib.tools.zic.Zone
-
public class Zone extends java.lang.Object
Zone - models a particular time zone. Time zones are particular to a political area where the government of that area has decided what the offset from GMT will be and what the rules for changing to daylight savings time will be, if any. Time zones contain a number of offset objects that document what the offset from GMT was in a particular time frame. For whatever reason, some areas, especially those on the borders of time zones, choose to move themselves into another time zone, or to start or stop observing daylight savings time. The offset instances document what those changes were from approximately 1970 to the present.
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addOffset(Offset offset)
Offset
getCurrentOffset()
org.json.JSONObject
getJson(boolean currentOnly)
java.lang.String
getName()
java.util.ArrayList<Offset>
getOffsets()
-
-
-
Field Detail
-
name
protected java.lang.String name
-
offsets
protected java.util.ArrayList<Offset> offsets
-
logger
protected org.apache.log4j.Logger logger
-
-
Constructor Detail
-
Zone
public Zone()
-
Zone
public Zone(java.lang.String line, java.util.HashMap<java.lang.String,RuleSet> ruleSets) throws ParseException
- Throws:
ParseException
-
-
Method Detail
-
getName
public java.lang.String getName()
-
addOffset
public void addOffset(Offset offset)
-
getCurrentOffset
public Offset getCurrentOffset()
-
getOffsets
public java.util.ArrayList<Offset> getOffsets()
-
getJson
public org.json.JSONObject getJson(boolean currentOnly) throws org.json.JSONException
- Throws:
org.json.JSONException
-
-