ZoneOffsetTransitionRule.TimeDefinition

public static final enum ZoneOffsetTransitionRule.TimeDefinition
extends Enum<ZoneOffsetTransitionRule.TimeDefinition>

java.lang.Object
   ↳ java.lang.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

ZoneOffsetTransitionRule.TimeDefinition  STANDARD

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

ZoneOffsetTransitionRule.TimeDefinition  UTC

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

ZoneOffsetTransitionRule.TimeDefinition  WALL

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

Public methods

LocalDateTime createDateTime(LocalDateTime dateTime, ZoneOffset standardOffset, ZoneOffset wallOffset)

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

static ZoneOffsetTransitionRule.TimeDefinition valueOf(String name)
static final TimeDefinition[] values()

Inherited methods

Enum values

STANDARD

added in API level 26
public static final ZoneOffsetTransitionRule.TimeDefinition STANDARD

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

UTC

added in API level 26
public static final ZoneOffsetTransitionRule.TimeDefinition UTC

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

WALL

added in API level 26
public static final ZoneOffsetTransitionRule.TimeDefinition WALL

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

Public methods

createDateTime

added in API level 26
public LocalDateTime createDateTime (LocalDateTime dateTime, 
                ZoneOffset standardOffset, 
                ZoneOffset wallOffset)

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

Returns
LocalDateTime the date-time relative to the wall/before offset, not null

valueOf

added in API level 26
public static ZoneOffsetTransitionRule.TimeDefinition valueOf (String name)

Parameters
name String

Returns
ZoneOffsetTransitionRule.TimeDefinition

values

added in API level 26
public static final TimeDefinition[] values ()

Returns
TimeDefinition[]