Added in API level 26

TimeDefinition

class TimeDefinition
kotlin.Any
   ↳ kotlin.Enum<java.time.zone.ZoneOffsetTransitionRule.TimeDefinition>
   ↳ java.time.zone.ZoneOffsetTransitionRule.TimeDefinition

A definition of the way a local time can be converted to the actual transition date-time.

Time zone rules are expressed in one of three ways:

  • Relative to UTC
  • Relative to the standard offset in force
  • Relative to the wall offset (what you would see on a clock on the wall)

Summary

Enum values

The local date-time is expressed in terms of the standard offset.

The local date-time is expressed in terms of the UTC offset.

The local date-time is expressed in terms of the wall offset.

Public methods
LocalDateTime!
createDateTime(dateTime: LocalDateTime!, standardOffset: ZoneOffset!, wallOffset: ZoneOffset!)

Converts the specified local date-time to the local date-time actually seen on a wall clock.

Enum values

STANDARD

Added in API level 26
enum val STANDARD : ZoneOffsetTransitionRule.TimeDefinition

The local date-time is expressed in terms of the standard offset.

UTC

Added in API level 26
enum val UTC : ZoneOffsetTransitionRule.TimeDefinition

The local date-time is expressed in terms of the UTC offset.

WALL

Added in API level 26
enum val WALL : ZoneOffsetTransitionRule.TimeDefinition

The local date-time is expressed in terms of the wall offset.

Public methods

createDateTime

Added in API level 26
fun createDateTime(
    dateTime: LocalDateTime!,
    standardOffset: ZoneOffset!,
    wallOffset: ZoneOffset!
): LocalDateTime!

Converts the specified local date-time to the local date-time actually seen on a wall clock.

This method converts using the type of this enum. The output is defined relative to the 'before' offset of the transition.

The UTC type uses the UTC offset. The STANDARD type uses the standard offset. The WALL type returns the input date-time. The result is intended for use with the wall-offset.

Parameters
dateTime LocalDateTime!: the local date-time, not null
standardOffset ZoneOffset!: the standard offset, not null
wallOffset ZoneOffset!: the wall offset, not null
Return
LocalDateTime! the date-time relative to the wall/before offset, not null