SimpleTimeZone class in java

The SimpleTimeZone class is a convenient subclass of TimeZone. It implements TimeZone’s abstract methods and allows you to work with time zones for a Gregorian calendar. It also computes daylight saving time.

SimpleTimeZone defines four constructors. One is

SimpleTimeZone(int timeDelta, String tzName)

This constructor creates a SimpleTimeZone object. The offset relative to Greenwich mean time (GMT) is timeDelta. The time zone is named tzName.

The second SimpleTimeZone constructor is

SimpleTimeZone(int timeDelta, String tzId, int dstMonth0, int dstDayInMonth0, int dstDay0, int time0,int dstMonth1, int dstDayInMonth1, int dstDay1, int time1)

The third SimpleTimeZone constructor is

SimpleTimeZone(int timeDelta, String tzId, int dstMonth0, int dstDayInMonth0, int dstDay0, int time0,int dstMonth1, int dstDayInMonth1, int dstDay1, int time1, int dstDelta)

fourth SimpleTimeZone constructor is

SimpleTimeZone(int timeDelta, String tzId, int dstMonth0, int dstDayInMonth0, int dstDay0, int time0,int time0mode, int dstMonth1, int dstDayInMonth1, int dstDay1, int time1, int time1mode, int dstDelta)

Leave a Comment