object PgTime
Some utilities to deal with Postgres' internal timestamp representations and boundaries.
- Alphabetic
- By Inheritance
- PgTime
- AnyRef
- Any
- Hide All
- Show All
- Public
- Protected
Value Members
- final def !=(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- final def ##: Int
- Definition Classes
- AnyRef → Any
- final def ==(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- val Epoch: Instant
Postgresql's Epoch is 2000-01-01T00:00:00Z Timestamp and TimestampTz store microseconds since this epoch as an 8-byte integer.
Postgresql's Epoch is 2000-01-01T00:00:00Z Timestamp and TimestampTz store microseconds since this epoch as an 8-byte integer.
NOTE: postgres used to use a floating point to represent this offset. To determine what internal representation it uses, use
SHOW integer_datetimes;
and this should printon
. This parameter is set at compile time and cannot be changed later on. - val Max: Instant
The maximum timestamp value Postgresql can represent
- val Min: Instant
The minimum timestamp value Postgresql can represent.
The minimum timestamp value Postgresql can represent.
NOTE: this happens to be the Julian calendar epoch, November 24, 4714 BC or -4713-11-24 in ISO NOTE: experimentation has shown that it actually supports up to -4713-12-31T23:59:59.999999
- final def asInstanceOf[T0]: T0
- Definition Classes
- Any
- def clone(): AnyRef
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.CloneNotSupportedException]) @native()
- def durationAsUsecOffset(duration: Duration): Long
Converts java.time.Duration to an offset (timestamp) from Postgres' epoch.
Converts java.time.Duration to an offset (timestamp) from Postgres' epoch. Postgres timestamps are stored as microseconds since its epoch. The value can be negative.
- final def eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- def equals(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef → Any
- def finalize(): Unit
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.Throwable])
- final def getClass(): Class[_ <: AnyRef]
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
- def hashCode(): Int
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
- def instantAsUsecOffset(instant: Instant): Long
Converts a java.time.Instant to a timestamp value.
Converts a java.time.Instant to a timestamp value. Postgres timestamps are stored as microseconds since its epoch. The value can be negative.
- final def isInstanceOf[T0]: Boolean
- Definition Classes
- Any
- final def ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- final def notify(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
- final def notifyAll(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
- final def synchronized[T0](arg0: => T0): T0
- Definition Classes
- AnyRef
- def toString(): String
- Definition Classes
- AnyRef → Any
- def usecOffsetAsDuration(usecFromEpoch: Long): Duration
Converts a timestamp value to a java.time.Duration from the Postgres' epoch.
Converts a timestamp value to a java.time.Duration from the Postgres' epoch. Postgres timestamps are stored as microseconds since its epoch. The value can be negative.
- def usecOffsetAsInstant(usecFromEpoch: Long): Instant
Converts a timestamp value to a java.time.Instant.
Converts a timestamp value to a java.time.Instant. Postgres timestamps are stored as microseconds since its epoch. The value can be negative.
- final def wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
- final def wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
- final def wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException]) @native()