| |
|
| java.lang.Object sun.tools.javazic.Timezone
Timezone | class Timezone (Code) | | Timezone represents all information of a single point of time to
generate its time zone database.
since: 1.4 |
Constructor Summary | |
| Timezone(String name) Constracts a Timezone object with the given zone name. |
LAST_DST | final static int LAST_DST(Code) | | |
NO_DST | final static int NO_DST(Code) | | |
UNDEF_DST | final static int UNDEF_DST(Code) | | |
X_DST | final static int X_DST(Code) | | |
Timezone | Timezone(String name)(Code) | | Constracts a Timezone object with the given zone name.
Parameters: name - the zone name |
addTransition | void addTransition(long time, int offset, int dstOffset)(Code) | | Adds the specified transition information to the end of the transition table.
Parameters: time - the UTC time at which this transition happens Parameters: offset - the total amount of the offset from GMT in milliseconds Parameters: dstOffset - the amount of time in milliseconds saved at this transition |
addUsedRec | void addUsedRec(ZoneRec rec)(Code) | | Addds the spcified zone record to the zone records list.
Parameters: rec - the zone record |
addUsedRec | void addUsedRec(RuleRec rec)(Code) | | Adds the specified rule record to the rule records list.
Parameters: rec - the rule record |
checksum | void checksum()(Code) | | Calculates the CRC32 value from the transition table and sets
the value to crc32 .
|
getCRC32 | int getCRC32()(Code) | | the checksum (crc32) value of the trasition table |
getDSTType | int getDSTType()(Code) | | the type of historical daylight saving timeobservation. |
getDstOffsetIndex | int getDstOffsetIndex(int offset)(Code) | | Stores the specified daylight saving value in the GMT offsets
table and returns its index. If the same value as the specified
offset is already in the table, its index is returned. If 0 is
specified, it's not stored in the table and -1 is returned.
Parameters: offset - the offset value in milliseconds the index to the specified offset value in the GMToffsets table, or -1 if 0 is specified. |
getLastDSTSaving | int getLastDSTSaving()(Code) | | the last daylight saving amount. |
getLastRules | ArrayList getLastRules()(Code) | | the last rule records for this time zone. |
getLastZoneRec | ZoneRec getLastZoneRec()(Code) | | the last zone record for this time zone. |
getNTransitions | int getNTransitions()(Code) | | the number of transitions |
getOffsetIndex | int getOffsetIndex(int offset)(Code) | | Stores the specified offset value from GMT in the GMT offsets
table and returns its index. The offset value includes the base
GMT offset and any additional daylight saving if applicable. If
the same value as the specified offset is already in the table,
its index is returned.
Parameters: offset - the offset value in milliseconds the index to the offset value in the GMT offsets table. |
getRawOffset | int getRawOffset()(Code) | | the last known GMT offset value in milliseconds |
getRules | ArrayList getRules()(Code) | | Returns the list of all rule records that have been referred to
by this time zone.
the rule records list |
getTransitions | ArrayList getTransitions()(Code) | | the transition table (list) |
getZones | ArrayList getZones()(Code) | | Returns the list of all zone records that have been referred to
by this time zone.
the zone records list |
optimize | void optimize()(Code) | | Removes unnecessary transitions for Java time zone support.
|
setDSTType | void setDSTType(int type)(Code) | | Sets the type of historical daylight saving time
observation. For example, China used to observed daylight
saving time, but it no longer does. Then, X_DST is set to the
China time zone.
Parameters: type - the type of daylight saving time |
setLastDSTSaving | void setLastDSTSaving(int offset)(Code) | | Sets the last daylight saving amount.
Parameters: the - daylight saving amount |
setLastRules | void setLastRules(ArrayList rules)(Code) | | Sets the last rule records for this time zone. Those are used
for generating SimpleTimeZone parameters.
Parameters: rules - the last rule records |
setLastZoneRec | void setLastZoneRec(ZoneRec zrec)(Code) | | Sets the last zone record for this time zone.
Parameters: the - last zone record |
setRawOffset | void setRawOffset(int offset)(Code) | | Sets time zone's GMT offset to offset .
Parameters: offset - the GMT offset value in milliseconds |
setRawOffset | void setRawOffset(int offset, long startTime)(Code) | | Sets time zone's GMT offset value to offset . If
startTime is future time, then the
Timezone.willRawOffsetChange value is set to true.
Parameters: offset - the GMT offset value in milliseconds Parameters: startTime - the UTC time at which the GMT offset is in effective |
willGMTOffsetChange | boolean willGMTOffsetChange()(Code) | | true if the GMT offset of this time zone would changeafter the time zone database has been generated, false, otherwise. |
|
|
|