public interface TransitionStrategy
Serves for resolving of local timestamps to a global UNIX timestamp, escpecially if there are conflicts due to gaps or overlaps on the local timeline.
| Modifier and Type | Method and Description |
|---|---|
ZonalOffset |
getOffset(GregorianDate localDate,
WallTime localTime,
Timezone timezone)
Calculates a suitable offset for given local timestamp.
|
long |
resolve(GregorianDate localDate,
WallTime localTime,
Timezone timezone)
Calculates a suitable global timestamp for given local timestamp.
|
default TransitionStrategy |
using(OverlapResolver resolver)
Tries to change the overlap handling.
|
long resolve(GregorianDate localDate, WallTime localTime, Timezone timezone)
Calculates a suitable global timestamp for given local timestamp.
The nanosecond fraction of given wall time will not be taken into account.
localDate - local calendar date in given timezonelocalTime - local wall time in given timezonetimezone - timezone data containing offset historyTimeScale.POSIX,
PlainTimestamp.in(Timezone),
Timezone.with(TransitionStrategy)ZonalOffset getOffset(GregorianDate localDate, WallTime localTime, Timezone timezone)
Calculates a suitable offset for given local timestamp.
localDate - local calendar date in given timezonelocalTime - local wall time in given timezonetimezone - timezone data containing offset historyPlainTimestamp.in(Timezone),
Timezone.with(TransitionStrategy)default TransitionStrategy using(OverlapResolver resolver)
Tries to change the overlap handling.
The default implementation does nothing.
resolver - strategy how to handle ambivalent mappings during an offset overlapCopyright © 2014–2017. All rights reserved.