class UtcOffset
source · line 9public
public class UtcOffset private constructor(
/**
* Signed seconds east of UTC.
*/
public val totalSeconds: Int) : Equals<UtcOffset>, Compare<UtcOffset>, Hash, ToString
- Supertype
Equals<UtcOffset> - Supertype
Compare<UtcOffset> - Supertype
Hash - Supertype
ToString
A fixed signed offset from UTC, at one-second resolution and within 18 hours in either direction. This is not a time-zone rule database.
function toString
source · line 30public
public override fun toString(): String
- Overrides
toString
Formats this value as Z or a signed HH:MM offset with optional seconds.
function equals
source · line 18public
public override operator fun equals(other: UtcOffset): Boolean
- Overrides
equals
Compares the stored value components for equality.
parameter other
source · line 18public
other: UtcOffset
function hash
source · line 26public
public override fun hash(): Long
- Overrides
hash
Computes a hash consistent with component equality.
property totalSeconds
source · line 13public
public val totalSeconds: Int
get: public read-only
Signed seconds east of UTC.
function compareTo
source · line 22public
public override operator fun compareTo(other: UtcOffset): Long
- Overrides
compareTo
Orders values by their chronological or numeric value; only the result sign is significant.
parameter other
source · line 22public
other: UtcOffset