| java.lang.Object | ||
| ↳ | java.util.TimeZone | |
| ↳ | java.util.SimpleTimeZone | |
SimpleTimeZone represents a local time zone and its daylight savings time rules for the gregorian calendar.
| Constants | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
| int | STANDARD_TIME | ||||||||||
| int | UTC_TIME | ||||||||||
| int | WALL_TIME | ||||||||||
|
[Expand]
Inherited Constants | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
From class
java.util.TimeZone
| |||||||||||
| Public Constructors | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
Constructs a new SimpleTimeZone using the specified offset for standard
time from GMT and the specified time zone ID.
| |||||||||||
Constructs a new SimpleTimeZone using the specified offset for standard
time from GMT, the specified time zone ID and the rules for daylight
savings time.
| |||||||||||
Constructs a new SimpleTimeZone using the specified offset for standard
time from GMT, the specified time zone ID and the rules for daylight
savings time.
| |||||||||||
Constructs a new SimpleTimeZone using the specified offset for standard
time from GMT, the specified time zone ID, the rules for daylight savings
time, and the modes indicating UTC, standard, or wall time.
| |||||||||||
| Public Methods | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
Returns a new SimpleTimeZone with the same ID, rawOffset and daylight
savings time rules as this SimpleTimeZone.
| |||||||||||
Compares the specified object to this SimpleTimeZone and answer if they
are equal.
| |||||||||||
Gets the daylight savings offset in milliseconds for this SimpleTimeZone.
| |||||||||||
Gets the offset from GMT of this SimpleTimeZone for the specified date
and time.
| |||||||||||
Gets the offset from GMT of this SimpleTimeZone for the specified date.
| |||||||||||
Gets the offset for standard time from GMT for this SimpleTimeZone.
| |||||||||||
Returns if the specified TimeZone has the same raw offset and daylight
savings time rules as this SimpleTimeZone.
| |||||||||||
Returns an integer hash code for the receiver.
| |||||||||||
Returns if the specified Date is in the daylight savings time period for
this SimpleTimeZone.
| |||||||||||
Sets the daylight savings offset in milliseconds for this SimpleTimeZone.
| |||||||||||
Sets the rule which specifies the end of daylight savings time.
| |||||||||||
Sets the rule which specifies the end of daylight savings time.
| |||||||||||
Sets the rule which specifies the end of daylight savings time.
| |||||||||||
Sets the offset for standard time from GMT for this SimpleTimeZone.
| |||||||||||
Sets the rule which specifies the start of daylight savings time.
| |||||||||||
Sets the rule which specifies the start of daylight savings time.
| |||||||||||
Sets the rule which specifies the start of daylight savings time.
| |||||||||||
Sets the starting year for daylight savings time in this SimpleTimeZone.
| |||||||||||
Returns the string representation of this SimpleTimeZone.
| |||||||||||
Returns if this TimeZone has a daylight savings time period.
| |||||||||||
|
[Expand]
Inherited Methods | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
From class java.util.TimeZone
| |||||||||||
From class java.lang.Object
| |||||||||||
Constructs a new SimpleTimeZone using the specified offset for standard time from GMT and the specified time zone ID.
| offset | the offset from GMT of standard time in milliseconds |
|---|---|
| name | the time zone ID |
Constructs a new SimpleTimeZone using the specified offset for standard time from GMT, the specified time zone ID and the rules for daylight savings time.
| offset | the offset from GMT of standard time in milliseconds |
|---|---|
| name | the time zone ID |
| startMonth | the Calendar month in which daylight savings time starts |
| startDay | the occurrence of the day of the week on which daylight savings time starts |
| startDayOfWeek | the Calendar day of the week on which daylight savings time starts |
| startTime | the time of day in milliseconds on which daylight savings time starts |
| endMonth | the Calendar month in which daylight savings time ends |
| endDay | the occurrence of the day of the week on which daylight savings time ends |
| endDayOfWeek | the Calendar day of the week on which daylight savings time ends |
| endTime | the time of day in milliseconds standard time on which daylight savings time ends |
Constructs a new SimpleTimeZone using the specified offset for standard time from GMT, the specified time zone ID and the rules for daylight savings time.
| offset | the offset from GMT of standard time in milliseconds |
|---|---|
| name | the time zone ID |
| startMonth | the Calendar month in which daylight savings time starts |
| startDay | the occurrence of the day of the week on which daylight savings time starts |
| startDayOfWeek | the Calendar day of the week on which daylight savings time starts |
| startTime | the time of day in milliseconds on which daylight savings time starts |
| endMonth | the Calendar month in which daylight savings time ends |
| endDay | the occurrence of the day of the week on which daylight savings time ends |
| endDayOfWeek | the Calendar day of the week on which daylight savings time ends |
| endTime | the time of day in milliseconds standard time on which daylight savings time ends |
| daylightSavings | the daylight savings time difference in milliseconds |
Constructs a new SimpleTimeZone using the specified offset for standard time from GMT, the specified time zone ID, the rules for daylight savings time, and the modes indicating UTC, standard, or wall time.
| offset | the offset from GMT of standard time in milliseconds |
|---|---|
| name | the time zone ID |
| startMonth | the Calendar month in which daylight savings time starts |
| startDay | the occurrence of the day of the week on which daylight savings time starts |
| startDayOfWeek | the Calendar day of the week on which daylight savings time starts |
| startTime | the time of day in milliseconds on which daylight savings time starts |
| startTimeMode | the mode (UTC, standard, or wall time) of the start time value |
| endMonth | the Calendar month in which daylight savings time ends |
| endDay | the occurrence of the day of the week on which daylight savings time ends |
| endDayOfWeek | the Calendar day of the week on which daylight savings time ends |
| endTime | the time of day in milliseconds standard time on which daylight savings time ends |
| endTimeMode | the mode (UTC, standard, or wall time) of the end time value |
| daylightSavings | the daylight savings time difference in milliseconds |
Returns a new SimpleTimeZone with the same ID, rawOffset and daylight savings time rules as this SimpleTimeZone.
Compares the specified object to this SimpleTimeZone and answer if they are equal. The object must be an instance of SimpleTimeZone and have the same properties.
| object | the object to compare with this object |
|---|
Gets the daylight savings offset in milliseconds for this SimpleTimeZone. If this SimpleTimezone does not observe daylight savings, returns 0.
Gets the offset from GMT of this SimpleTimeZone for the specified date and time. The offset includes daylight savings time if the specified date and time are within the daylight savings time period.
| era | the GregorianCalendar era, either GregorianCalendar.BC or GregorianCalendar.AD |
|---|---|
| year | the year |
| month | the Calendar month |
| day | the day of the month |
| dayOfWeek | the Calendar day of the week |
| time | the time of day in milliseconds |
Gets the offset from GMT of this SimpleTimeZone for the specified date. The offset includes daylight savings time if the specified date is within the daylight savings time period.
| time | the date in milliseconds since January 1, 1970 00:00:00 GMT |
|---|
Gets the offset for standard time from GMT for this SimpleTimeZone.
Returns if the specified TimeZone has the same raw offset and daylight savings time rules as this SimpleTimeZone.
| zone | a TimeZone |
|---|
Returns an integer hash code for the receiver. Objects which are equal answer the same value for this method.
Returns if the specified Date is in the daylight savings time period for this SimpleTimeZone.
| time | a Date |
|---|
Sets the daylight savings offset in milliseconds for this SimpleTimeZone.
| milliseconds | the daylight savings offset in milliseconds |
|---|
Sets the rule which specifies the end of daylight savings time.
| month | the Calendar month in which daylight savings time ends |
|---|---|
| day | the occurrence of the day of the week on which daylight savings time ends |
| dayOfWeek | the Calendar day of the week on which daylight savings time ends |
| time | the time of day in milliseconds standard time on which daylight savings time ends |
Sets the rule which specifies the end of daylight savings time.
| month | the Calendar month in which daylight savings time ends |
|---|---|
| day | the Calendar day of the month |
| dayOfWeek | the Calendar day of the week on which daylight savings time ends |
| time | the time of day in milliseconds on which daylight savings time ends |
| after | selects the day after or before the day of month |
Sets the rule which specifies the end of daylight savings time.
| month | the Calendar month in which daylight savings time ends |
|---|---|
| dayOfMonth | the Calendar day of the month on which daylight savings time ends |
| time | the time of day in milliseconds standard time on which daylight savings time ends |
Sets the offset for standard time from GMT for this SimpleTimeZone.
| offset | the offset from GMT of standard time in milliseconds |
|---|
Sets the rule which specifies the start of daylight savings time.
| month | the Calendar month in which daylight savings time starts |
|---|---|
| dayOfMonth | the Calendar day of the month on which daylight savings time starts |
| time | the time of day in milliseconds on which daylight savings time starts |
Sets the rule which specifies the start of daylight savings time.
| month | the Calendar month in which daylight savings time starts |
|---|---|
| day | the occurrence of the day of the week on which daylight savings time starts |
| dayOfWeek | the Calendar day of the week on which daylight savings time starts |
| time | the time of day in milliseconds on which daylight savings time starts |
Sets the rule which specifies the start of daylight savings time.
| month | the Calendar month in which daylight savings time starts |
|---|---|
| day | the Calendar day of the month |
| dayOfWeek | the Calendar day of the week on which daylight savings time starts |
| time | the time of day in milliseconds on which daylight savings time starts |
| after | selects the day after or before the day of month |
Sets the starting year for daylight savings time in this SimpleTimeZone. Years before this start year will always be in standard time.
| year | the starting year |
|---|
Returns the string representation of this SimpleTimeZone.
Returns if this TimeZone has a daylight savings time period.