Target filter
Search Kotlin docs
  • Platforms
  • Tealium Prism Kotlin
core/com.tealium.prism.core.api.misc/DateUtils/offsetInHours

offsetInHours

@RequiresApi(value = 26)
open override fun offsetInHours(instant: Instant, timeZone: ZoneId): Double
open override fun offsetInHours(date: Date, timeZone: TimeZone): Double

Returns the timezone offset in hours, as a Double. Where the integral part of the returned Double is the whole number of hours, and the fractional part is the minutes.

e.g. 1 => +01:00 5.75 => +05:45 -4.5 => -04:30

Generated by Dokka
(c) Tealium 2026