Package net.snowflake.client.jdbc
Class SnowflakeTimestampWithTimezone
- java.lang.Object
-
- java.util.Date
-
- java.sql.Timestamp
-
- net.snowflake.client.jdbc.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 Summary
Constructors Constructor Description SnowflakeTimestampWithTimezone(long seconds, int nanoseconds, TimeZone timezone)
SnowflakeTimestampWithTimezone(Timestamp ts)
SnowflakeTimestampWithTimezone(Timestamp ts, TimeZone timezone)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description TimeZone
getTimezone()
Gets the timezone.String
toString()
Returns a string representation in UTCZonedDateTime
toZonedDateTime()
Converts this timestamp to a zoned date time.-
Methods inherited from class java.sql.Timestamp
after, before, compareTo, compareTo, equals, equals, from, getNanos, getTime, hashCode, setNanos, setTime, toInstant, toLocalDateTime, valueOf, valueOf
-
Methods inherited from class java.util.Date
after, before, clone, getDate, getDay, getHours, getMinutes, getMonth, getSeconds, getTimezoneOffset, getYear, parse, setDate, setHours, setMinutes, setMonth, setSeconds, setYear, toGMTString, toLocaleString, UTC
-
-
-
-
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.
-
-