UtcOffset

@Serializable(with = UtcOffsetSerializer::class)
actual class UtcOffset(source)
@Serializable(with = UtcOffsetSerializer::class)
expect class UtcOffset(source)

An offset from UTC.

Examples of these values:

  • Z, an offset of zero;

  • +05, plus five hours;

  • -02, minus two hours;

  • +03:30, plus three hours and thirty minutes;

  • +01:23:45, plus one hour, 23 minutes, and 45 seconds.

@Serializable(with = UtcOffsetSerializer::class)
actual class UtcOffset(zoneOffset: ZoneOffset)(source)
@Serializable(with = UtcOffsetSerializer::class)
actual class UtcOffset(source)

Constructors

Link copied to clipboard
constructor(zoneOffset: ZoneOffset)

Types

Link copied to clipboard
actual object Companion
expect object Companion
actual object Companion
actual object Companion
Link copied to clipboard
actual object Formats
expect object Formats

A collection of predefined formats for parsing and formatting UtcOffset values.

actual object Formats
actual object Formats

Properties

Link copied to clipboard
actual val totalSeconds: Int
expect val totalSeconds: Int

The number of seconds from UTC.

actual val totalSeconds: Int
actual val totalSeconds: Int

Functions

Link copied to clipboard

Returns the fixed-offset time zone with the given UTC offset.

equals
Link copied to clipboard
open operator override fun equals(other: Any?): Boolean
open operator override fun equals(other: Any?): Boolean
open operator override fun equals(other: Any?): Boolean
Link copied to clipboard

Formats this value using the given format. Equivalent to calling DateTimeFormat.format on format with this.

hashCode
Link copied to clipboard
open override fun hashCode(): Int
open override fun hashCode(): Int
open override fun hashCode(): Int
Link copied to clipboard
Link copied to clipboard
actual open override fun toString(): String
expect open override fun toString(): String

Converts this UTC offset to the extended ISO-8601 string representation.

actual open override fun toString(): String
actual open override fun toString(): String