public class CachedDateTimeZone extends DateTimeZone
CachedDateTimeZone is thread-safe and immutable.
DEFAULT_TZ_DATA_PATH, UTC| Modifier and Type | Method and Description |
|---|---|
boolean |
equals(Object obj)
Compare this datetime zone with another.
|
static CachedDateTimeZone |
forZone(DateTimeZone zone)
Returns a new CachedDateTimeZone unless given zone is already cached.
|
String |
getNameKey(long instant)
Returns a non-localized name that is unique to this time zone.
|
int |
getOffset(long instant)
Gets the millisecond offset to add to UTC to get local time.
|
int |
getStandardOffset(long instant)
Gets the raw millisecond offset to add to UTC.
|
DateTimeZone |
getUncachedZone()
Returns the DateTimeZone being wrapped.
|
int |
hashCode()
Gets a hash code compatible with equals.
|
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.
|
adjustOffset, convertLocalToUTC, convertLocalToUTC, convertUTCToLocal, forID, forOffsetHours, forOffsetHoursMinutes, forOffsetMillis, forTimeZone, getAvailableIDs, getDefault, getID, getMillisKeepLocal, getName, getName, getNameProvider, getOffset, getOffsetFromLocal, getProvider, getShortName, getShortName, isLocalDateTimeGap, isStandardOffset, setDefault, setNameProvider, setProvider, toString, toTimeZone, writeReplacepublic static CachedDateTimeZone forZone(DateTimeZone zone)
public DateTimeZone getUncachedZone()
public String getNameKey(long instant)
DateTimeZonegetNameKey in class DateTimeZoneinstant - milliseconds from 1970-01-01T00:00:00Z to get the name forpublic int getOffset(long instant)
DateTimeZoneThis returns the actual offset from UTC for the zone at the specified instant. If the method is called with a different instant, the offset returned may be different as a result of daylight saving or other government rule changes.
getOffset in class DateTimeZoneinstant - milliseconds from 1970-01-01T00:00:00Z to get the offset forpublic int getStandardOffset(long instant)
DateTimeZone
This should be treated as an implementation detail.
End-users should use DateTimeZone.getOffset(long).
This returns the raw offset from UTC for the zone at the specified instant, effectively ignoring DST. If the method is called with a different instant, the offset returned may be different as a result of government rule changes.
This method should be named getRawOffset() but cannot be renamed for compatibility reasons.
getStandardOffset in class DateTimeZoneinstant - milliseconds from 1970-01-01T00:00:00Z to get the offset forpublic boolean isFixed()
DateTimeZoneisFixed in class DateTimeZonepublic long nextTransition(long instant)
DateTimeZonenextTransition in class DateTimeZoneinstant - milliseconds from 1970-01-01T00:00:00Zpublic long previousTransition(long instant)
DateTimeZonepreviousTransition in class DateTimeZoneinstant - milliseconds from 1970-01-01T00:00:00Zpublic int hashCode()
DateTimeZonehashCode in class DateTimeZonepublic boolean equals(Object obj)
DateTimeZoneequals in class DateTimeZoneobj - the object to compare withCopyright © 2002–2025 Joda.org. All rights reserved.