public interface TransitionHistory
Keeps all offset transitions and rules of a timezone.
| Modifier and Type | Method and Description |
|---|---|
ZonalTransition |
getConflictTransition(GregorianDate localDate,
WallTime localTime)
Returns the conflict transition where given local timestamp
falls either in a gap or in an overlap on the local timeline.
|
ZonalOffset |
getInitialOffset()
Return the initial offset no matter if there are any
transitions defined or not.
|
ZonalTransition |
getStartTransition(UnixTime ut)
Queries the last transition which defines the offset
for given global timestamp.
|
List<ZonalTransition> |
getStdTransitions()
Return the offset transitions from UNIX epoch [1970-01-01T00:00Z]
until at maximum the first transition after the current timestamp.
|
List<ZonalTransition> |
getStdTransitionsAfter(UnixTime ut)
Returns the next transitions in ascending order if available.
|
List<ZonalTransition> |
getStdTransitionsBefore(UnixTime ut)
Returns the previous transitions in descending order if available.
|
List<ZonalTransition> |
getTransitions(UnixTime startInclusive,
UnixTime endExclusive)
Returns the defined transitions in given POSIX-interval.
|
List<ZonalOffset> |
getValidOffsets(GregorianDate localDate,
WallTime localTime)
Determines the suitable offsets at given local timestamp..
|
ZonalOffset getInitialOffset()
Return the initial offset no matter if there are any transitions defined or not.
If any transition is defined then the initial offset
is identical to the shift getPreviousOffset() of
the first defined transition in history.
ZonalTransition getStartTransition(UnixTime ut)
Queries the last transition which defines the offset for given global timestamp.
ut - unix reference timeZonalTransition or null if given reference time
is before first defined transitionZonalTransition getConflictTransition(GregorianDate localDate, WallTime localTime)
Returns the conflict transition where given local timestamp falls either in a gap or in an overlap on the local timeline.
localDate - local date in timezonelocalTime - local wall time in timezonenullgetValidOffsets(GregorianDate,WallTime)List<ZonalOffset> getValidOffsets(GregorianDate localDate, WallTime localTime)
Determines the suitable offsets at given local timestamp..
The offset list is empty if the local timestamp falls in a gap on the local timeline. The list has exactly two offsets if the local timestamp belongs to two different timepoints on the POSIX timescale due to an overlap. Otherwise the offset list will contain exactly one suitable offset.
localDate - local date in timezonelocalTime - local wall time in timezonegetConflictTransition(GregorianDate,WallTime)List<ZonalTransition> getStdTransitions()
Return the offset transitions from UNIX epoch [1970-01-01T00:00Z] until at maximum the first transition after the current timestamp.
Indeed, a potentially bigger interval is obtainable by
getTransitions(UnixTime,UnixTime), but earlier or
later timepoints are usually not reliable. For example the
wide-spread IANA/Olson-repository is only designed for times
since UNIX epoch and offers some selected older data to the
best of our knowledge. Users must be aware that even older
data can be changed as side effect of data corrections. Generally
the timezone concept was invented in 19th century. And future
transitions are even less reliable due to political arbitrariness.
List<ZonalTransition> getStdTransitionsBefore(UnixTime ut)
Returns the previous transitions in descending order if available.
In general, this method will only yield transitions in the interval from [1970-01-01T00:00Z] until at maximum the first transition before the current timestamp (in descending order on the timeline!).
ut - unix reference timegetStdTransitions()List<ZonalTransition> getStdTransitionsAfter(UnixTime ut)
Returns the next transitions in ascending order if available.
In general, this method will only yield transitions in the interval from [1970-01-01T00:00Z] until at maximum the first transition before the current timestamp.
ut - unix reference timegetStdTransitions()List<ZonalTransition> getTransitions(UnixTime startInclusive, UnixTime endExclusive)
Returns the defined transitions in given POSIX-interval.
startInclusive - start time on POSIX time scaleendExclusive - end time on POSIX time scalegetStdTransitions()Copyright © 2014. All rights reserved.