Interface Datetime.TimeTZ<T>

All Superinterfaces:
Adapter.Contract<T>, Adapter.Contract.Scalar<T>
All Known Implementing Classes:
Datetime.TimeTZ.AsOffsetTime
Enclosing interface:
Datetime
Functional Interface:
This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.

@FunctionalInterface public static interface Datetime.TimeTZ<T> extends Adapter.Contract.Scalar<T>
The TIMETZ type's PostgreSQL semantics: microseconds since midnight, accompanied by a time zone offset expressed in seconds.
  • Nested Class Summary

    Nested Classes
    Modifier and Type
    Interface
    Description
    static class 
    A reference implementation that maps to OffsetTime.
    static interface 
    Functional interface to obtain information from the PostgreSQL type modifier applied to the type.

    Nested classes/interfaces inherited from interface org.postgresql.pljava.Adapter.Contract

    Adapter.Contract.Array<T,E,A extends Adapter<E,?>>, Adapter.Contract.Scalar<T>
  • Method Summary

    Modifier and Type
    Method
    Description
    construct(long microsecondsSinceMidnight, int secondsWestOfPrimeMeridian)
    Constructs a representation T from the components of the PostgreSQL data type.
  • Method Details

    • construct

      T construct(long microsecondsSinceMidnight, int secondsWestOfPrimeMeridian)
      Constructs a representation T from the components of the PostgreSQL data type.

      The first argument represents microseconds since midnight, nonnegative and not exceeding USECS_PER_DAY, and the second is a time zone offset expressed in seconds, positive for locations west of the prime meridian.

      It should be noted that other common conventions, such as ISO 8601 and java.time.ZoneOffset, use positive offsets for locations east of the prime meridian, requiring a sign flip.

      Also noteworthy, as with Time, is that the first argument may exactly equal USECS_PER_DAY; 24:00:00 is a valid value to PostgreSQL. That may need extra attention if the representation to be constructed doesn't allow that.

      Parameters:
      microsecondsSinceMidnight - the time of day, in the zone indicated by the second argument
      secondsWestOfPrimeMeridian - note that the sign of this time zone offset will be the opposite of that used in other common systems using positive values for offsets east of the prime meridian.