| Modifier and Type | Field and Description |
|---|---|
| private static final TreeSet | |
| private transient volatile boolean | |
| private transient Calendar | |
| private TimeZone | |
| private static Method | |
| private static final long |
| Access | Constructor and Description |
|---|---|
| public | |
| public | JavaTimeZone(TimeZone
the Java TimeZone jtz, String the ID of the zone. if null, the zone ID is initialized
by the given Java TimeZone's ID. id)Constructs a JavaTimeZone with the specified Java TimeZone and ID. |
| Modifier and Type | Method and Description |
|---|---|
| public Object | |
| public TimeZone | cloneAsThawed()
Overrides com. Implements com. |
| public static JavaTimeZone | Returns: An instance of JavaTimeZone for the given ID, or null when the ID cannot be understood.A timezone ID, either a system ID or a custom ID. id)Creates an instance of JavaTimeZone with the given timezone ID. |
| public TimeZone | freeze()
Overrides com. Implements com. |
| public int | getDSTSavings()
Overrides com. |
| public int | getOffset(int
the era of the given date. era, int the year in the given date. year, int the month in the given date.
Month is 0-based. e.g., 0 for January. month, int the day-in-month of the given date. day, int the day-of-week of the given date. dayOfWeek, int the millis in day in standard local time. milliseconds)Implements abstract com. |
| public void | getOffset(long
moment in time for which to return offsets, in
units of milliseconds from January 1, 1970 0:00 GMT, either GMT
time or local wall time, depending on date, boolean local.if true, local, int[] date is local wall time; otherwise it
is in GMT time.output parameter to receive the raw offset, that
is, the offset not including DST adjustments, in offsets[0],
and the DST offset, that is, the offset to be added to
offsets)rawOffset to obtain the total offset between local and GMT
time, in offsets[1]. If DST is not in effect, the DST offset is
zero; otherwise it is a positive value, typically one hour.Overrides com. |
| public int | getRawOffset()
Implements abstract com. |
| public int | |
| public boolean | inDaylightTime(Date
the given Date. date)Implements abstract com. |
| public boolean | isFrozen()
Overrides com. Implements com. |
| public boolean | observesDaylightTime()
Queries if this time zone is in daylight saving time or will observe
daylight saving time at any future time.
|
| private void | |
| public void | setRawOffset(int
the given base time zone offset to GMT. offsetMillis)Implements abstract com. |
| public TimeZone | |
| public boolean | useDaylightTime()
Implements abstract com. |
| AVAILABLESET | back to summary |
|---|---|
| private static final TreeSet<String> AVAILABLESET | |
| isFrozen | back to summary |
|---|---|
| private transient volatile boolean isFrozen | |
| javacal | back to summary |
|---|---|
| private transient Calendar javacal | |
| javatz | back to summary |
|---|---|
| private TimeZone javatz | |
| mObservesDaylightTime | back to summary |
|---|---|
| private static Method mObservesDaylightTime | |
| serialVersionUID | back to summary |
|---|---|
| private static final long serialVersionUID | |
| JavaTimeZone | back to summary |
|---|---|
| public JavaTimeZone() Constructs a JavaTimeZone with the default Java TimeZone | |
| JavaTimeZone | back to summary |
|---|---|
| public JavaTimeZone(TimeZone jtz, String id) Constructs a JavaTimeZone with the specified Java TimeZone and ID. | |
| clone | back to summary |
|---|---|
| public Object clone() Overrides com. Doc from com. Overrides clone.
| |
| cloneAsThawed | back to summary |
|---|---|
| public TimeZone cloneAsThawed() Overrides com. Implements com. Doc from com. Provides for the clone operation. Any clone is initially unfrozen.
| |
| createTimeZone | back to summary |
|---|---|
| public static JavaTimeZone createTimeZone(String id) Creates an instance of JavaTimeZone with the given timezone ID.
| |
| freeze | back to summary |
|---|---|
| public TimeZone freeze() Overrides com. Implements com. Doc from com. Freezes the object.
| |
| getDSTSavings | back to summary |
|---|---|
| public int getDSTSavings() Overrides com. Doc from com. Returns the amount of time to be added to local standard time to get local wall clock time. The default implementation always returns 3600000 milliseconds (i.e., one hour) if this time zone observes Daylight Saving Time. Otherwise, 0 (zero) is returned. If an underlying TimeZone implementation subclass supports historical Daylight Saving Time changes, this method returns the known latest daylight saving value.
| |
| getOffset | back to summary |
|---|---|
| public int getOffset(int era, int year, int month, int day, int dayOfWeek, int milliseconds) Implements abstract com. Doc from com. Gets the time zone offset, for current date, modified in case of daylight savings. This is the offset to add to UTC to get local time.
| |
| getOffset | back to summary |
|---|---|
| public void getOffset(long date, boolean local, int[] offsets) Overrides com. Doc from com. Returns the time zone raw and GMT offset for the given moment in time. Upon return, local-millis = GMT-millis + rawOffset + dstOffset. All computations are performed in the proleptic Gregorian calendar. The default implementation in the TimeZone class delegates to the 8-argument getOffset().
| |
| getRawOffset | back to summary |
|---|---|
| public int getRawOffset() Implements abstract com. Doc from com. Gets unmodified offset, NOT modified in case of daylight savings. This is the offset to add to UTC to get local time.
| |
| hashCode | back to summary |
|---|---|
| public int hashCode() Overrides com. Doc from com. Overrides hashCode.
| |
| inDaylightTime | back to summary |
|---|---|
| public boolean inDaylightTime(Date date) Implements abstract com. Doc from com. Queries if the given date is in daylight savings time in this time zone. | |
| isFrozen | back to summary |
|---|---|
| public boolean isFrozen() Overrides com. Implements com. Doc from com. Determines whether the object has been frozen or not.
| |
| observesDaylightTime | back to summary |
|---|---|
| public boolean observesDaylightTime() Overrides com. Doc from com. Queries if this time zone is in daylight saving time or will observe daylight saving time at any future time. The default implementation in this class returns Note This method was added for
ICU's TimeZone subclass implementations override this method to support the same behavior
with
| |
| readObject | back to summary |
|---|---|
| private void readObject(ObjectInputStream s) throws IOException, ClassNotFoundException | |
| setRawOffset | back to summary |
|---|---|
| public void setRawOffset(int offsetMillis) Implements abstract com. Doc from com. Sets the base time zone offset to GMT. This is the offset to add to UTC to get local time.
| |
| unwrap | back to summary |
|---|---|
| public TimeZone unwrap() | |
| useDaylightTime | back to summary |
|---|---|
| public boolean useDaylightTime() Implements abstract com. Doc from com. Queries if this time zone uses daylight savings time.
| |