public class PGTimestamp
extends java.sql.Timestamp
| Modifier and Type | Field and Description |
|---|---|
private java.util.Calendar |
calendar
The optional calendar for this timestamp.
|
private static long |
serialVersionUID
The serial version UID.
|
| Constructor and Description |
|---|
PGTimestamp(long time)
Constructs a
PGTimestamp without a time zone. |
PGTimestamp(long time,
java.util.Calendar calendar)
Constructs a
PGTimestamp with the given time zone. |
| Modifier and Type | Method and Description |
|---|---|
java.lang.Object |
clone() |
boolean |
equals(java.lang.Object obj) |
java.util.Calendar |
getCalendar()
Returns the calendar object for this timestamp.
|
int |
hashCode() |
void |
setCalendar(java.util.Calendar calendar)
Sets the calendar object for this timestamp.
|
after, before, compareTo, compareTo, equals, from, getNanos, getTime, setNanos, setTime, toInstant, toLocalDateTime, toString, valueOf, valueOfprivate static final long serialVersionUID
private java.util.Calendar calendar
public PGTimestamp(long time)
PGTimestamp 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 PGTimestamp(long time,
java.util.Calendar calendar)
Constructs a PGTimestamp 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(java.util.Calendar calendar)
calendar - the calendar object or null.public java.util.Calendar getCalendar()
null.public int hashCode()
hashCode in class java.sql.Timestamppublic boolean equals(java.lang.Object obj)
equals in class java.sql.Timestamppublic java.lang.Object clone()
clone in class java.util.Date