com.intel.util
Class TimeZone
- java.lang.Object
-
- com.intel.util.TimeZone
-
public class TimeZone extends java.lang.Object
This class represents a time zone and provides a method to calculate the time zone offset from GMT. It can be used by applets when configuring their time notion usingCalendar
objects.- See Also:
Calendar
-
-
Constructor Summary
Constructors Constructor and Description TimeZone()
Default Constructor.TimeZone(byte hours, boolean halfHourAdjust, boolean dayLightSaving)
Constructor - Creates a TimeZone instance with the given parameters.
-
Method Summary
Methods Modifier and Type Method and Description int
getRawOffset()
Returns the raw offset (in seconds) which needs to be added to GMT to get the local time.
-
-
-
Constructor Detail
-
TimeZone
public TimeZone(byte hours, boolean halfHourAdjust, boolean dayLightSaving) throws UtilException
Constructor - Creates a TimeZone instance with the given parameters.- Parameters:
hours
- represents the deviation (in hours) of the local time from GMT (can be a positive or a negative number)halfHourAdjust
- iftrue
, adds half an hour to the local time calculation. For example, if hours=(+5) then the time will be GMT +5:30; if hours=(-5) then the time will be GMT -4:30.dayLightSaving
- iftrue
, applies the daylight saving scheme when calculating the local time (adds one hour to the local time calculation)- Throws:
IllegalParameterException
- if the hours value isn't in the allowed range [-11, 14]UtilException
-
TimeZone
public TimeZone()
Default Constructor. Creates a default instance of TimeZone with GMT as the value.
-
-