DthingApi
|
Public Member Functions | |
SimpleTimeZone (int offset, final String name) | |
SimpleTimeZone (int offset, String name, int startMonth, int startDay, int startDayOfWeek, int startTime, int endMonth, int endDay, int endDayOfWeek, int endTime) | |
SimpleTimeZone (int offset, String name, int startMonth, int startDay, int startDayOfWeek, int startTime, int endMonth, int endDay, int endDayOfWeek, int endTime, int daylightSavings) | |
SimpleTimeZone (int offset, String name, int startMonth, int startDay, int startDayOfWeek, int startTime, int startTimeMode, int endMonth, int endDay, int endDayOfWeek, int endTime, int endTimeMode, int daylightSavings) | |
Object | clone () |
boolean | equals (Object object) |
int | getDSTSavings () |
int | getOffset (int era, int year, int month, int day, int dayOfWeek, int time) |
int | getOffset (long time) |
int | getRawOffset () |
synchronized int | hashCode () |
boolean | hasSameRules (TimeZone zone) |
boolean | inDaylightTime (Date time) |
void | setDSTSavings (int milliseconds) |
void | setEndRule (int month, int dayOfMonth, int time) |
void | setEndRule (int month, int day, int dayOfWeek, int time) |
void | setEndRule (int month, int day, int dayOfWeek, int time, boolean after) |
void | setRawOffset (int offset) |
void | setStartRule (int month, int dayOfMonth, int time) |
void | setStartRule (int month, int day, int dayOfWeek, int time) |
void | setStartRule (int month, int day, int dayOfWeek, int time, boolean after) |
void | setStartYear (int year) |
String | toString () |
boolean | useDaylightTime () |
![]() | |
Object | clone () |
String | getID () |
int | getDSTSavings () |
int | getOffset (long time) |
abstract int | getOffset (int era, int year, int month, int day, int dayOfWeek, int timeOfDayMillis) |
abstract int | getRawOffset () |
boolean | hasSameRules (TimeZone timeZone) |
abstract boolean | inDaylightTime (Date time) |
void | setID (String id) |
abstract void | setRawOffset (int offsetMillis) |
abstract boolean | useDaylightTime () |
Static Public Attributes | |
static final int | UTC_TIME = 2 |
static final int | STANDARD_TIME = 1 |
static final int | WALL_TIME = 0 |
![]() | |
static final int | SHORT = 0 |
static final int | LONG = 1 |
Additional Inherited Members | |
![]() | |
static synchronized String [] | getAvailableIDs () |
static synchronized String [] | getAvailableIDs (int offsetMillis) |
static synchronized TimeZone | getDefault () |
static native String | getDefaultId () |
static synchronized TimeZone | getTimeZone (String id) |
static synchronized void | setDefault (TimeZone timeZone) |
is a concrete subclass of
that represents a time zone for use with a Gregorian calendar. This class does not handle historical changes.
Use a negative value for
to indicate that
should count from the end of the month backwards. For example, Daylight Savings Time ends at the last (dayOfWeekInMonth = -1) Sunday in October, at 2 AM in standard time.
|
inline |
Constructs a
with the given base time zone offset from GMT and time zone ID. Timezone IDs can be obtained from
. Normally you should use
to construct a
.
offset | the given base time zone offset to GMT. |
name | the time zone ID which is obtained from TimeZone.getAvailableIDs |
|
inline |
Constructs a
with the given base time zone offset from GMT, time zone ID, and times to start and end the daylight savings time. Timezone IDs can be obtained from
. Normally you should use
to create a
. For a time zone that does not use daylight saving time, do not use this constructor; instead you should use
.
By default, this constructor specifies day-of-week-in-month rules. That is, if the
is 1, and the
is
, then this indicates the first Sunday in the
. A
of -1 likewise indicates the last Sunday. However, by using negative or zero values for certain parameters, other types of rules can be specified.
Day of month: To specify an exact day of the month, such as March 1, set
to zero.
Day of week after day of month: To specify the first day of the week occurring on or after an exact day of the month, make the day of the week negative. For example, if
is 5 and
is
, this indicates the first Monday on or after the 5th day of the
.
Day of week before day of month: To specify the last day of the week occurring on or before an exact day of the month, make the day of the week and the day of the month negative. For example, if
is
and
is
, this indicates the last Wednesday on or before the 21st of the
.
The above examples refer to the
,
, and
; the same applies for the
,
, and
.
The daylight savings time difference is set to the default value: one hour.
offset | the given base time zone offset to GMT. |
name | the time zone ID which is obtained from TimeZone.getAvailableIDs |
startMonth | the daylight savings starting month. The month indexing is 0-based. eg, 0 for January. |
startDay | the daylight savings starting day-of-week-in-month. Please see the member description for an example. |
startDayOfWeek | the daylight savings starting day-of-week. Please see the member description for an example. |
startTime | the daylight savings starting time in local wall time, which is standard time in this case. Please see the member description for an example. |
endMonth | the daylight savings ending month. The month indexing is 0-based. eg, 0 for January. |
endDay | the daylight savings ending day-of-week-in-month. Please see the member description for an example. |
endDayOfWeek | the daylight savings ending day-of-week. Please see the member description for an example. |
endTime | the daylight savings ending time in local wall time, which is daylight time in this case. Please see the member description for an example. |
IllegalArgumentException | if the month, day, dayOfWeek, or time parameters are out of range for the start or end rule. |
|
inline |
Constructs a
with the given base time zone offset from GMT, time zone ID, times to start and end the daylight savings time, and the daylight savings time difference in milliseconds.
offset | the given base time zone offset to GMT. |
name | the time zone ID which is obtained from TimeZone.getAvailableIDs |
startMonth | the daylight savings starting month. Month is 0-based. eg, 0 for January. |
startDay | the daylight savings starting day-of-week-in-month. Please see the description of SimpleTimeZone(int, String, int, int, int, int, int, int, int, int) for an example. |
startDayOfWeek | the daylight savings starting day-of-week. Please see the description of SimpleTimeZone(int, String, int, int, int, int, int, int, int, int) for an example. |
startTime | The daylight savings starting time in local wall time, which is standard time in this case. Please see the description of SimpleTimeZone(int, String, int, int, int, int, int, int, int, int) for an example. |
endMonth | the daylight savings ending month. Month is 0-based. eg, 0 for January. |
endDay | the daylight savings ending day-of-week-in-month. Please see the description of SimpleTimeZone(int, String, int, int, int, int, int, int, int, int) for an example. |
endDayOfWeek | the daylight savings ending day-of-week. Please see the description of SimpleTimeZone(int, String, int, int, int, int, int, int, int, int) for an example. |
endTime | the daylight savings ending time in local wall time, which is daylight time in this case. Please see the description of SimpleTimeZone(int, String, int, int, int, int, int, int, int, int) for an example. |
daylightSavings | the daylight savings time difference in milliseconds. |
IllegalArgumentException | if the month, day, dayOfWeek, or time parameters are out of range for the start or end rule. |
|
inline |
Construct a
with the given base time zone offset from GMT, time zone ID, times to start and end the daylight savings time including a mode specifier, the daylight savings time difference in milliseconds. The mode specifies either WALL_TIME, STANDARD_TIME, or UTC_TIME.
offset | the given base time zone offset to GMT. |
name | the time zone ID which is obtained from TimeZone.getAvailableIDs |
startMonth | the daylight savings starting month. The month indexing is 0-based. eg, 0 for January. |
startDay | the daylight savings starting day-of-week-in-month. Please see the description of SimpleTimeZone(int, String, int, int, int, int, int, int, int, int) for an example. |
startDayOfWeek | the daylight savings starting day-of-week. Please see the description of SimpleTimeZone(int, String, int, int, int, int, int, int, int, int) for an example. |
startTime | the time of day in milliseconds on which daylight savings time starts, based on the startTimeMode |
startTimeMode | the mode (UTC, standard, or wall time) of the start time value. |
endDay | the day of the week on which daylight savings time ends. |
endMonth | the daylight savings ending month. The month indexing is 0-based. eg, 0 for January. |
endDayOfWeek | the daylight savings ending day-of-week. Please see the description of SimpleTimeZone(int, String, int, int, int, int, int, int, int, int) for an example. |
endTime | the time of day in milliseconds on which daylight savings time ends, based on the endTimeMode |
endTimeMode | the mode (UTC, standard, or wall time) of the end time value. |
daylightSavings | the daylight savings time difference in milliseconds. |
IllegalArgumentException | if the month, day, dayOfWeek, or time parameters are out of range for the start or end rule. |
|
inline |
Returns a new
with the same ID,
and daylight savings time rules as this SimpleTimeZone.
|
inline |
Compares the specified object to this
and returns whether they are equal. The object must be an instance of
and have the same internal data.
object | the object to compare with this object. |
|
inline |
Returns an integer hash code for the receiver. Objects which are equal return the same value for this method.
|
inline |
Sets the daylight savings offset in milliseconds for this
.
milliseconds | the daylight savings offset in milliseconds. |
|
inline |
Sets the rule which specifies the end of daylight savings time.
month | the Calendar |
dayOfMonth | the Calendar |
time | the time of day in milliseconds standard time on which daylight savings time ends. |
|
inline |
Sets the rule which specifies the end of daylight savings time.
month | the Calendar |
day | the occurrence of the day of the week on which daylight savings time ends. |
dayOfWeek | the Calendar |
time | the time of day in milliseconds standard time on which daylight savings time ends. |
|
inline |
Sets the rule which specifies the end of daylight savings time.
month | the Calendar |
day | the Calendar |
dayOfWeek | the Calendar |
time | the time of day in milliseconds on which daylight savings time ends. |
after | selects the day after or before the day of month. |
|
inline |
Sets the offset for standard time from GMT for this
.
offset | the offset from GMT of standard time in milliseconds. |
|
inline |
Sets the rule which specifies the start of daylight savings time.
month | the Calendar |
dayOfMonth | the Calendar |
time | the time of day in milliseconds on which daylight savings time starts. |
|
inline |
Sets the rule which specifies the start of daylight savings time.
month | the Calendar |
day | the occurrence of the day of the week on which daylight savings time starts. |
dayOfWeek | the Calendar |
time | the time of day in milliseconds on which daylight savings time starts. |
|
inline |
Sets the rule which specifies the start of daylight savings time.
month | the Calendar |
day | the Calendar |
dayOfWeek | the Calendar |
time | the time of day in milliseconds on which daylight savings time starts. |
after | selects the day after or before the day of month. |
|
inline |
Sets the starting year for daylight savings time in this
. Years before this start year will always be in standard time.
year | the starting year. |
|
inline |
Returns the string representation of this
.
|
static |
The constant for representing a start or end time in standard local time mode, based on timezone's raw offset from GMT; does not include Daylight savings.
|
static |
The constant for representing a start or end time in GMT time mode.
|
static |
The constant for representing a start or end time in local wall clock time mode, based on timezone's adjusted offset from GMT; includes Daylight savings.