Interface LocalTimeOffset.Strategy

Enclosing class:
LocalTimeOffset

public static interface LocalTimeOffset.Strategy
  • Method Summary

    Modifier and Type
    Method
    Description
    long
    beforeGap(long localMillis, LocalTimeOffset.Gap gap)
    Handle a local time that happened before the start of a gap.
    long
    beforeOverlap(long localMillis, LocalTimeOffset.Overlap overlap)
    Handle a local time that happened before the start of an overlap.
    long
    inGap(long localMillis, LocalTimeOffset.Gap gap)
    Handle a local time that never actually happened because a "gap" jumped over it.
    long
    inOverlap(long localMillis, LocalTimeOffset.Overlap overlap)
    Handle a local time that happened twice because an "overlap" jumped behind it.
  • Method Details

    • inGap

      long inGap(long localMillis, LocalTimeOffset.Gap gap)
      Handle a local time that never actually happened because a "gap" jumped over it. This happens in many time zones when folks wind their clocks forwards in the spring.
      Returns:
      the time in utc representing the local time
    • beforeGap

      long beforeGap(long localMillis, LocalTimeOffset.Gap gap)
      Handle a local time that happened before the start of a gap.
      Returns:
      the time in utc representing the local time
    • inOverlap

      long inOverlap(long localMillis, LocalTimeOffset.Overlap overlap)
      Handle a local time that happened twice because an "overlap" jumped behind it. This happens in many time zones when folks wind their clocks back in the fall.
      Returns:
      the time in utc representing the local time
    • beforeOverlap

      long beforeOverlap(long localMillis, LocalTimeOffset.Overlap overlap)
      Handle a local time that happened before the start of an overlap.
      Returns:
      the time in utc representing the local time