パッケージ org.postgresql.util
クラス PGTimestamp
java.lang.Object
java.util.Date
java.sql.Timestamp
org.postgresql.util.PGTimestamp
- すべての実装されたインタフェース:
Serializable
,Cloneable
,Comparable<Date>
This class augments the Java built-in Timestamp to allow for explicit setting of the time zone.
- 関連項目:
-
コンストラクタの概要
コンストラクタコンストラクタ説明PGTimestamp
(long time) Constructs aPGTimestamp
without a time zone.PGTimestamp
(long time, @Nullable Calendar calendar) Constructs aPGTimestamp
with the given time zone. -
メソッドの概要
修飾子とタイプメソッド説明clone()
boolean
@Nullable Calendar
Returns the calendar object for this timestamp.int
hashCode()
void
setCalendar
(@Nullable Calendar calendar) Sets the calendar object for this timestamp.クラスから継承されたメソッド java.sql.Timestamp
after, before, compareTo, compareTo, equals, from, getNanos, getTime, setNanos, setTime, toInstant, toLocalDateTime, toString, valueOf, valueOf
クラスから継承されたメソッド java.util.Date
after, before, getDate, getDay, getHours, getMinutes, getMonth, getSeconds, getTimezoneOffset, getYear, parse, setDate, setHours, setMinutes, setMonth, setSeconds, setYear, toGMTString, toLocaleString, UTC
-
コンストラクタの詳細
-
PGTimestamp
public PGTimestamp(long time) Constructs aPGTimestamp
without a time zone. The integral seconds are stored in the underlying date value; the fractional seconds are stored in thenanos
field of theTimestamp
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.- 関連項目:
-
PGTimestamp
Constructs a
PGTimestamp
with the given time zone. The integral seconds are stored in the underlying date value; the fractional seconds are stored in thenanos
field of theTimestamp
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 atimestamp with time zone
using theTimeZone
in the calendar object. Furthermore, this calendar will be used instead of the calendar object passed toPreparedStatement.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 ornull
.- 関連項目:
-
-
メソッドの詳細
-
setCalendar
Sets the calendar object for this timestamp.- パラメータ:
calendar
- the calendar object ornull
.
-
getCalendar
Returns the calendar object for this timestamp.- 戻り値:
- the calendar object or
null
.
-
hashCode
public int hashCode() -
equals
-
clone
-