public final class CachedDateTimeZone extends StorableDateTimeZone
CachedDateTimeZone is thread-safe and immutable.
ALIAS, DST, FIXED, PRECALCULATED
Modifier and Type | Method and Description |
---|---|
static CachedDateTimeZone |
forZone(StorableDateTimeZone zone)
Returns a new CachedDateTimeZone unless given zone is already cached.
|
int |
getOffset(long instant)
Gets the millisecond offset to add to UTC to get local time.
|
int |
getStandardOffset(long instant)
Gets the standard millisecond offset to add to UTC to get local time,
when standard time is in effect.
|
DateTimeZone |
getUncachedZone()
Returns the DateTimeZone being wrapped.
|
boolean |
isFixed()
Returns true if this time zone has no transitions.
|
long |
nextTransition(long instant)
Advances the given instant to where the time zone offset or name changes.
|
long |
previousTransition(long instant)
Retreats the given instant to where the time zone offset or name changes.
|
void |
write(StringBuilder sb) |
read, readTime, readTimeArray, readUnsignedTime, writeTime, writeTimeArray, writeUnsignedTime
adjustOffset, convertLocalToUTC, convertLocalToUTC, convertUTCToLocal, getID, getMillisKeepLocal, getOffsetFromLocal, isStandardOffset
public static CachedDateTimeZone forZone(StorableDateTimeZone zone)
public void write(StringBuilder sb)
write
in class StorableDateTimeZone
public DateTimeZone getUncachedZone()
public int getOffset(long instant)
DateTimeZone
getOffset
in class DateTimeZone
instant
- milliseconds from 1970-01-01T00:00:00Z to get the offset forpublic int getStandardOffset(long instant)
DateTimeZone
getStandardOffset
in class DateTimeZone
instant
- milliseconds from 1970-01-01T00:00:00Z to get the offset forpublic boolean isFixed()
DateTimeZone
isFixed
in class DateTimeZone
public long nextTransition(long instant)
DateTimeZone
nextTransition
in class DateTimeZone
instant
- milliseconds from 1970-01-01T00:00:00Zpublic long previousTransition(long instant)
DateTimeZone
previousTransition
in class DateTimeZone
instant
- milliseconds from 1970-01-01T00:00:00ZCopyright © 2019. All rights reserved.