Class TimestampWithTimezone

    • Constructor Detail

      • TimestampWithTimezone

        public TimestampWithTimezone​(Calendar time)
        Creates a new instance from a Calendar, which must have a non-null time zone
        Parameters:
        time - The calendar instance
      • TimestampWithTimezone

        public TimestampWithTimezone​(long time,
                                     TimeZone tz)
        Creates a new instance from an epoch millisecond timestamp and a TimeZone
        Parameters:
        time - The epoch millisecond timestamp
        tz - The time zone
      • TimestampWithTimezone

        public TimestampWithTimezone​(long time,
                                     ZoneId tz)
        Creates a new instance from an epoch millisecond timestamp and a ZoneId
        Parameters:
        time - The epoch millisecond timestamp
        tz - The zone ID
    • Method Detail

      • getZone

        public ZoneId getZone()
        Gets the ZoneId associated with this timestamp
        Returns:
        The zone ID
      • getZonedCalendar

        public Calendar getZonedCalendar()
        Gets the zoned calendar for use with PreparedStatement.setTimestamp and other methods
        Returns:
        The zoned calendar object