public class RedshiftTimestamp extends Timestamp
| Constructor and Description |
|---|
RedshiftTimestamp(long time)
Constructs a
RedshiftTimestamp without a time zone. |
RedshiftTimestamp(long time,
Calendar calendar)
Constructs a
RedshiftTimestamp with the given time zone. |
RedshiftTimestamp(long time,
Calendar calendar,
String s) |
| Modifier and Type | Method and Description |
|---|---|
Object |
clone() |
boolean |
equals(Object obj) |
Calendar |
getCalendar()
Returns the calendar object for this timestamp.
|
String |
getPostgresqlString()
Specialized to string method to return the timestamp in a format that is the same as
opensource driver
|
int |
hashCode() |
void |
setCalendar(Calendar calendar)
Sets the calendar object for this timestamp.
|
String |
toString() |
after, before, compareTo, compareTo, equals, from, getNanos, getTime, setNanos, setTime, toInstant, toLocalDateTime, valueOf, valueOfafter, before, getDate, getDay, getHours, getMinutes, getMonth, getSeconds, getTimezoneOffset, getYear, parse, setDate, setHours, setMinutes, setMonth, setSeconds, setYear, toGMTString, toLocaleString, UTCpublic RedshiftTimestamp(long time)
RedshiftTimestamp without a time zone. The integral seconds are stored in
the underlying date value; the fractional seconds are stored in the nanos field of
the Timestamp object.time - milliseconds since January 1, 1970, 00:00:00 GMT. A negative number is the number
of milliseconds before January 1, 1970, 00:00:00 GMT.Timestamp(long)public RedshiftTimestamp(long time,
Calendar calendar)
Constructs a RedshiftTimestamp with the given time zone. The integral seconds are stored
in the underlying date value; the fractional seconds are stored in the nanos field
of the Timestamp object.
The calendar object is optional. If absent, the driver will treat the timestamp as
timestamp without time zone. When present, the driver will treat the timestamp as
a timestamp with time zone using the TimeZone in the calendar object.
Furthermore, this calendar will be used instead of the calendar object passed to
PreparedStatement.setTimestamp(int, Timestamp, Calendar).
time - milliseconds since January 1, 1970, 00:00:00 GMT. A negative number is the number
of milliseconds before January 1, 1970, 00:00:00 GMT.calendar - the calendar object containing the time zone or null.Timestamp(long)public void setCalendar(Calendar calendar)
calendar - the calendar object or null.public Calendar getCalendar()
null.public String getPostgresqlString()
Copyright © 2024 Amazon.com Inc.. All rights reserved.