Class 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.
    • Field Summary

      Fields 
      Modifier and Type Field Description
      protected org.apache.log4j.Logger logger  
      protected java.lang.String name  
      protected java.util.ArrayList<Offset> offsets  
    • Constructor Summary

      Constructors 
      Constructor Description
      Zone()  
      Zone​(java.lang.String line, java.util.HashMap<java.lang.String,​RuleSet> ruleSets)  
    • Field Detail

      • name

        protected java.lang.String name
      • offsets

        protected java.util.ArrayList<Offset> offsets
      • logger

        protected org.apache.log4j.Logger logger
    • 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