VTimeZone is a class implementing RFC2445 VTIMEZONE. You can create a
VTimeZone instance from a time zone ID supported by TimeZone.
With the VTimeZone instance created from the ID, you can write out the rule
in RFC2445 VTIMEZONE format. Also, you can create a VTimeZone instance
from RFC2445 VTIMEZONE data stream, which allows you to calculate time
zone offset by the rules defined by the data.Note
The consumer of this class reading or writing VTIMEZONE data is responsible to decode or encode Non-ASCII text. Methods reading/writing VTIMEZONE data in this class do nothing with MIME encoding.
| Modifier and Type | Field and Description |
|---|---|
| private static final String | |
| private static final String | |
| private static final int | |
| private static final long | |
| private static final String | |
| private static final int | |
| private static final String | |
| private static final String | |
| private static final String | |
| private static final String | |
| private static final String | |
| private static final String | |
| private static final String[] | |
| private static final String | |
| private static final String | |
| private static final String | |
| private static final String | |
| private static final String | |
| private static final String | |
| private static final String | |
| private static final String | |
| private static final String | |
| private static final String | |
| private static final String | |
| private static final String | |
| private static final String | |
| private static final String | |
| private static final String | |
| private static final String | |
| private static final String | |
| private static String | |
| private static final int | |
| private transient volatile boolean | |
| private Date | |
| private static final long | |
| private static final long | |
| private static final int[] | |
| private static final String | |
| private String | |
| private static final String | |
| private static final long | |
| private BasicTimeZone | |
| private static final int | |
| private String | |
| private static final int | |
| private List |
| Access | Constructor and Description |
|---|---|
| private | |
| private |
| Modifier and Type | Method and Description |
|---|---|
| private static void | |
| private static void | |
| private static void | beginZoneProps(Writer writer, boolean isDst, String tzname, int fromOffset, int toOffset, long startTime)
|
| public Object | |
| public TimeZone | cloneAsThawed()
Overrides com. Implements com. |
| public static VTimeZone | |
| public static VTimeZone | |
| private static TimeZoneRule | createRuleByRDATE(String tzname, int rawOffset, int dstSavings, long start, List<String> dates, int fromOffset)
|
| private static TimeZoneRule | createRuleByRRULE(String tzname, int rawOffset, int dstSavings, long start, List<String> dates, int fromOffset)
|
| private static void | |
| public TimeZone | freeze()
Overrides com. Implements com. |
| private static String | |
| private static String | |
| public Date | Returns: The Date represents the RFC2445 LAST-MODIFIED date.Gets the RFC2445 LAST-MODIFIED property value. |
| public TimeZoneTransition | getNextTransition(long
The base time. base, boolean Whether the base time is inclusive or not. inclusive)Implements abstract com. ICU |
| 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 void | getOffsetFromLocal(long date, BasicTimeZone.
Overrides com. ICU |
| public TimeZoneTransition | getPreviousTransition(long
The base time. base, boolean Whether the base time is inclusive or not. inclusive)Implements abstract com. ICU |
| public int | getRawOffset()
Implements abstract com. |
| public TimeZoneRule[] | |
| public TimeZoneRule[] | getTimeZoneRules(long
The start time (inclusive). start)Overrides com. ICU |
| public String | |
| private static String | |
| public boolean | hasEquivalentTransitions(TimeZone
The instance of other, long TimeZoneThe start time of the evaluated time range (inclusive) start, long The end time of the evaluated time range (inclusive) end)Overrides com. ICU |
| public boolean | hasSameRules(TimeZone
the other)TimeZone object to be compared withOverrides com. |
| public boolean | inDaylightTime(Date
the given Date. date)Implements abstract com. |
| private static boolean | |
| public boolean | isFrozen()
Overrides com. Implements com. |
| private boolean | |
| private static String | |
| private static String | |
| public boolean | observesDaylightTime()
Queries if this time zone is in daylight saving time or will observe
daylight saving time at any future time.
|
| private static int | |
| private boolean | |
| private static long | |
| private static int[] | |
| public void | setLastModified(Date
The date)Date object represents the date for RFC2445 LAST-MODIFIED property value.Sets the date used for RFC2445 LAST-MODIFIED property value. |
| public void | setRawOffset(int
the given base time zone offset to GMT. offsetMillis)Implements abstract com. |
| public void | |
| private static DateTimeRule | |
| public boolean | useDaylightTime()
Implements abstract com. |
| public void | |
| public void | |
| private static void | writeFinalRule(Writer writer, boolean isDst, AnnualTimeZoneRule rule, int fromRawOffset, int fromDSTSavings, long startTime)
|
| private static void | |
| private void | |
| public void | writeSimple(Writer
The writer, long Writer used for the outputThe date time)Writes RFC2445 VTIMEZONE data applicable near the specified date. |
| private void | |
| private static void | writeZonePropsByDOM(Writer writer, boolean isDst, String tzname, int fromOffset, int toOffset, int month, int dayOfMonth, long startTime, long untilTime)
|
| private static void | writeZonePropsByDOW(Writer writer, boolean isDst, String tzname, int fromOffset, int toOffset, int month, int weekInMonth, int dayOfWeek, long startTime, long untilTime)
|
| private static void | writeZonePropsByDOW_GEQ_DOM(Writer writer, boolean isDst, String tzname, int fromOffset, int toOffset, int month, int dayOfMonth, int dayOfWeek, long startTime, long untilTime)
|
| private static void | writeZonePropsByDOW_GEQ_DOM_sub(Writer writer, int month, int dayOfMonth, int dayOfWeek, int numDays, long untilTime, int fromOffset)
|
| private static void | writeZonePropsByDOW_LEQ_DOM(Writer writer, boolean isDst, String tzname, int fromOffset, int toOffset, int month, int dayOfMonth, int dayOfWeek, long startTime, long untilTime)
|
| private static void | writeZonePropsByTime(Writer writer, boolean isDst, String tzname, int fromOffset, int toOffset, long time, boolean withRDATE)
|