object RebaseDateTime
The collection of functions for rebasing days and microseconds from/to the hybrid calendar (Julian + Gregorian since 1582-10-15) which is used by Spark 2.4 and earlier versions to/from Proleptic Gregorian calendar which is used by Spark since version 3.0. See SPARK-26651.
- Alphabetic
- By Inheritance
- RebaseDateTime
- AnyRef
- Any
- Hide All
- Show All
- Public
- Protected
Type Members
- case class RebaseSpec(mode: internal.LegacyBehaviorPolicy.Value, originTimeZone: Option[String] = None) extends Product with Serializable
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
- final def asInstanceOf[T0]: T0
- Definition Classes
- Any
- def clone(): AnyRef
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.CloneNotSupportedException]) @IntrinsicCandidate() @native()
- final def eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- def equals(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef → Any
- final def getClass(): Class[_ <: AnyRef]
- Definition Classes
- AnyRef → Any
- Annotations
- @IntrinsicCandidate() @native()
- def hashCode(): Int
- Definition Classes
- AnyRef → Any
- Annotations
- @IntrinsicCandidate() @native()
- final def isInstanceOf[T0]: Boolean
- Definition Classes
- Any
- final val lastSwitchGregorianDay: Int
- final val lastSwitchGregorianTs: Long
- final val lastSwitchJulianDay: Int
- final val lastSwitchJulianTs: Long
- final def ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- final def notify(): Unit
- Definition Classes
- AnyRef
- Annotations
- @IntrinsicCandidate() @native()
- final def notifyAll(): Unit
- Definition Classes
- AnyRef
- Annotations
- @IntrinsicCandidate() @native()
- def rebaseGregorianToJulianDays(days: Int): Int
An optimized version of localRebaseGregorianToJulianDays(Int).
An optimized version of localRebaseGregorianToJulianDays(Int). This method leverages the pre-calculated rebasing array to save calculation. For dates of Before Common Era, the function falls back to the regular unoptimized version.
- days
The number of days since the epoch in Gregorian calendar. It can be negative.
- returns
The rebased number of days since the epoch in Julian calendar.
- def rebaseGregorianToJulianMicros(micros: Long): Long
An optimized version of Long).
An optimized version of Long). This method leverages the pre-calculated rebasing maps to save calculation. If the rebasing map doesn't contain information about the current JVM system time zone or
micros
is related to Before Common Era, the function falls back to the regular unoptimized version.Note: The function assumes that the input micros was derived from a local timestamp at the default system JVM time zone in Proleptic Gregorian calendar.
- micros
The number of microseconds since the epoch '1970-01-01T00:00:00Z' in Proleptic Gregorian calendar. It can be negative.
- returns
The rebased microseconds since the epoch in Julian calendar.
- def rebaseGregorianToJulianMicros(timeZoneId: String, micros: Long): Long
An optimized version of Long).
An optimized version of Long). This method leverages the pre-calculated rebasing maps to save calculation. If the rebasing map doesn't contain information about the given time zone
timeZoneId
ormicros
is related to Before Common Era, the function falls back to the regular unoptimized version.- timeZoneId
A string identifier of a time zone.
- micros
The number of microseconds since the epoch '1970-01-01T00:00:00Z' in Proleptic Gregorian calendar. It can be negative.
- returns
The rebased microseconds since the epoch in Julian calendar.
- def rebaseJulianToGregorianDays(days: Int): Int
An optimized version of localRebaseJulianToGregorianDays(Int).
An optimized version of localRebaseJulianToGregorianDays(Int). This method leverages the pre-calculated rebasing array to save calculation. For dates of Before Common Era, the function falls back to the regular unoptimized version.
- days
The number of days since the epoch in Julian calendar. It can be negative.
- returns
The rebased number of days in Gregorian calendar.
- def rebaseJulianToGregorianMicros(micros: Long): Long
An optimized version of Long).
An optimized version of Long). This method leverages the pre-calculated rebasing maps to save calculation. If the rebasing map doesn't contain information about the current JVM system time zone or
micros
is related to Before Common Era, the function falls back to the regular unoptimized version.Note: The function assumes that the input micros was derived from a local timestamp at the default system JVM time zone in the Julian calendar.
- micros
The number of microseconds since the epoch '1970-01-01T00:00:00Z' in the Julian calendar. It can be negative.
- returns
The rebased microseconds since the epoch in Proleptic Gregorian calendar.
- def rebaseJulianToGregorianMicros(timeZoneId: String, micros: Long): Long
An optimized version of Long).
An optimized version of Long). This method leverages the pre-calculated rebasing maps to save calculation. If the rebasing map doesn't contain information about the given time zone
timeZoneId
ormicros
is related to Before Common Era, the function falls back to the regular unoptimized version.- timeZoneId
A string identifier of a time zone.
- micros
The number of microseconds since the epoch '1970-01-01T00:00:00Z' in the Julian calendar. It can be negative.
- returns
The rebased microseconds since the epoch in Proleptic Gregorian calendar.
- final def synchronized[T0](arg0: => T0): T0
- Definition Classes
- AnyRef
- def toString(): String
- Definition Classes
- AnyRef → Any
- 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()
- final def wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
Deprecated Value Members
- def finalize(): Unit
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.Throwable]) @Deprecated
- Deprecated
(Since version 9)