bb.util
Class DateUtil.TimeZoneChange

java.lang.Object
  extended by bb.util.DateUtil.TimeZoneChange
Enclosing class:
DateUtil

private static class DateUtil.TimeZoneChange
extends Object

Stores information about a time zone change.

Background on time zone changes:

Daylight Saving Time begins for most of the United States at 2 a.m. on the first Sunday of April. Time reverts to standard time at 2 a.m. on the last Sunday of October. In the U.S., each time zone switches at a different time.

In the European Union, Summer Time begins and ends at 1 am Universal Time (Greenwich Mean Time).
It starts the last Sunday in March, and ends the last Sunday in October. In the EU, all time zones change at the same moment.

Taken from http://webexhibits.org/daylightsaving/b.html

This class is multithread safe: it has no mutable state.


Field Summary
private  int amount
          Has the value -1 for a fall back time zone change, 0 if no time zone change, or +1 for a spring forward time zone change.
private  long time
          Stores the exact absolute time when the time zone change happens; has the value Long.MIN_VALUE if there is no time zone change.
 
Constructor Summary
private DateUtil.TimeZoneChange(Date date)
           
 
Method Summary
private  boolean occurred()
           
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

time

private final long time
Stores the exact absolute time when the time zone change happens; has the value Long.MIN_VALUE if there is no time zone change.


amount

private final int amount
Has the value -1 for a fall back time zone change, 0 if no time zone change, or +1 for a spring forward time zone change.

Constructor Detail

DateUtil.TimeZoneChange

private DateUtil.TimeZoneChange(Date date)
Method Detail

toString

public String toString()
Overrides:
toString in class Object

occurred

private boolean occurred()