SimpleTimeZone class methods in Java Part -II

java.util.SimpleTimeZone

SimpleTimeZone is a concrete subclass of TimeZone that represents a time zone for use with a Gregorian calendar. The class holds an offset from GMT, called raw offset, and start and end rules for a daylight saving time schedule.

Some methods of SimpleTimeZone class.


inDaylightTime(Date): This method queries if the given date is in daylight saving time.


observesDaylightTime(): This method returns true if this SimpleTimeZone observesDaylight Saving Time.


setDSTSavings(int): This method sets the amount of time in milliseconds that the clock is advanced during daylight saving time.


setEndRule(int, int, int): This method sets the daylight saving time end rule to a fixed date within a month.


setEndRule(int, int, int, int): This method sets the daylight saving time end rule.


setEndRule(int, int, int, int, boolean):  This method sets the daylight saving time end rule to a weekday before or after the given date within a month.


setID(String): This method sets the time zone ID.


setRawOffset(int): This method sets the base time zone offset to GMT.


setStartRule(int, int, int): This method sets the daylight saving time start rule to a fixed date within a month.


setStartRule(int, int, int, int): This method sets the daylight saving time start rule.


setStartRule(int, int, int, int, boolean): This method sets the daylight saving time start rule to a weekday before or after the given date within a month.


setStartYear(int): This method sets the daylight saving time starting year.


toString(): This method returns a string representation of this time zone.


useDaylightTime(): This method queries if this time zone uses daylight saving time.


Some more Methods of SimpleTimeZone



No comments:

Post a Comment