com.wewebu.ow.server.util
Class OwTimeZoneInfo

java.lang.Object
  extended by com.wewebu.ow.server.util.OwTimeZoneInfo

public class OwTimeZoneInfo
extends Object

Time Zone information (UTC offset , hemisphere location , daylight savings) used to select or guess a corresponding time zone.

Alfresco Workdesk
Copyright (c) Alfresco Software, Inc.
All rights reserved.

For licensing information read the license.txt file or
go to: http://wiki.alfresco.com

Since:
3.1.0.3

Constructor Summary
OwTimeZoneInfo()
          Constructor
Based on current time zone information.
OwTimeZoneInfo(Date reference_p, TimeZone timeZone_p)
          Constructor
OwTimeZoneInfo(long date_p, int offset_p, boolean observesDaylightSavings_p, Long[] transitions_p, boolean northernHemisphere_p)
          Constructor
OwTimeZoneInfo(TimeZone timeZone_p)
           
 
Method Summary
 boolean equals(Object obj)
           
static Set<Long> findDSTTransitions(TimeZone zone_p)
           
static Set<Long> getDSTTrasitions()
           
 int getOffset()
           
 TimeZone getTimeZone()
           
static Set<Long> getZoneDSTTransitions(String timeZoneID_p)
           
 int hashCode()
           
 boolean isNorthernHemisphere()
           
 boolean isObservesDaylightSavings()
           
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

OwTimeZoneInfo

public OwTimeZoneInfo()
Constructor
Based on current time zone information.


OwTimeZoneInfo

public OwTimeZoneInfo(TimeZone timeZone_p)

OwTimeZoneInfo

public OwTimeZoneInfo(Date reference_p,
                      TimeZone timeZone_p)
Constructor

Parameters:
timeZone_p - time zone used to extract the information

OwTimeZoneInfo

public OwTimeZoneInfo(long date_p,
                      int offset_p,
                      boolean observesDaylightSavings_p,
                      Long[] transitions_p,
                      boolean northernHemisphere_p)
Constructor

Parameters:
date_p - January 1, 1970, 00:00:00 relative time of this information object
offset_p - offset of this time zone from UTC at the specified date (date_p)
observesDaylightSavings_p - true if the time zone indicated by this object observes daylight savings
transitions_p - long UTC time-stamps of daylight savings transition days
northernHemisphere_p - true if the time zone indicated by this object is located in the northern hemisphere
Method Detail

findDSTTransitions

public static Set<Long> findDSTTransitions(TimeZone zone_p)

getZoneDSTTransitions

public static Set<Long> getZoneDSTTransitions(String timeZoneID_p)
Parameters:
timeZoneID_p - a time zone id as defined by TimeZone.getAvailableIDs()
Returns:
a set UTC time stamps for all daylight savings transition days found for the given zone

getDSTTrasitions

public static Set<Long> getDSTTrasitions()
Returns:
a set of all UTC time stamps for all daylight savings in all time zones defined by TimeZone

getTimeZone

public TimeZone getTimeZone()
Returns:
a time zone that matches this information object or null if no matching time zone can be found

isNorthernHemisphere

public boolean isNorthernHemisphere()
Returns:
true if this information object indicates a time zone in the northern hemisphere

getOffset

public int getOffset()
Returns:
UTC offset of the time zone indicated by this time zone

isObservesDaylightSavings

public boolean isObservesDaylightSavings()
Returns:
true if the time zone object indicated by this object observes daylight savings

hashCode

public int hashCode()
Overrides:
hashCode in class Object

equals

public boolean equals(Object obj)
Overrides:
equals in class Object

toString

public String toString()
Overrides:
toString in class Object


Copyright © 2013 Alfresco Business Solutions. All Rights Reserved.