TimeZoneRules

interface TimeZoneRules

The set of rules for a particular time zone.

Functions

daylightSavingsAt
Link copied to clipboard
common
abstract fun daylightSavingsAt(instant: Instant): Seconds

Gets the amount of daylight savings time in effect at a particular instant. This is the amount of time added to the standard offset.

isDaylightSavingsAt
Link copied to clipboard
common
abstract fun isDaylightSavingsAt(instant: Instant): Boolean

Checks if daylight savings time is in effect at a particular instant.

isValidOffset
Link copied to clipboard
common
open fun isValidOffset(dateTime: DateTime, offset: UtcOffset): Boolean

Checks if offset is valid at particular date and time.

offsetAt
Link copied to clipboard
common
abstract fun offsetAt(dateTime: DateTime): UtcOffset

Gets the offset in effect at a particular date and time.

abstract fun offsetAt(instant: Instant): UtcOffset
abstract fun offsetAt(instant: PlatformInstant): UtcOffset

Gets the offset in effect at a particular instant.

abstract fun offsetAt(millisecondsSinceUnixEpoch: Milliseconds): UtcOffset

Gets the offset in effect at a certain number of milliseconds since the Unix epoch.

abstract fun offsetAt(secondsSinceUnixEpoch: Seconds, nanoOfSeconds: Nanoseconds): UtcOffset

Gets the offset in effect at a certain number of seconds since the Unix epoch.

transitionAt
Link copied to clipboard
common
abstract fun transitionAt(dateTime: DateTime): TimeZoneOffsetTransition?

Gets the transition at a particular date and time, if one exists.

validOffsetsAt
Link copied to clipboard
common
abstract fun validOffsetsAt(dateTime: DateTime): List<UtcOffset>

Gets a list of the valid offsets at a particular date and time.

Properties

hasFixedOffset
Link copied to clipboard
common
abstract val hasFixedOffset: Boolean

Checks if the time zone has a fixed offset from UTC.