Class SnowflakeTimestampWithTimezone

  • All Implemented Interfaces:
    Serializable, Cloneable, Comparable<Date>

    public class SnowflakeTimestampWithTimezone
    extends Timestamp
    Timestamp with toString() overridden to display timestamp in session timezone. The default timezone is UTC if no timezone is specified.
    See Also:
    Serialized Form
    • Constructor Detail

      • SnowflakeTimestampWithTimezone

        public SnowflakeTimestampWithTimezone​(long seconds,
                                              int nanoseconds,
                                              TimeZone timezone)
      • SnowflakeTimestampWithTimezone

        public SnowflakeTimestampWithTimezone​(Timestamp ts,
                                              TimeZone timezone)
      • SnowflakeTimestampWithTimezone

        public SnowflakeTimestampWithTimezone​(Timestamp ts)
    • Method Detail

      • getTimezone

        public TimeZone getTimezone()
        Gets the timezone.
        Returns:
        the timezone.
      • toZonedDateTime

        public ZonedDateTime toZonedDateTime()
        Converts this timestamp to a zoned date time.
        Returns:
        the zoned date time corresponding to this timestamp.
      • toString

        public String toString()
        Returns a string representation in UTC
        Overrides:
        toString in class Timestamp
        Returns:
        a string representation of the object