public static enum ZoneOffsetTransitionRule.TimeDefinition extends Enum<ZoneOffsetTransitionRule.TimeDefinition>
Time zone rules are expressed in one of three ways:
| 枚举常量 | 说明 |
|---|---|
STANDARD |
The local date-time is expressed in terms of the standard offset.
|
UTC |
The local date-time is expressed in terms of the UTC offset.
|
WALL |
The local date-time is expressed in terms of the wall offset.
|
| 限定符和类型 | 方法 | 说明 |
|---|---|---|
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 ZoneOffsetTransitionRule.TimeDefinition[] |
values() |
按照声明该枚举类型的常量的顺序, 返回
包含这些常量的数组。该方法可用于迭代
常量, 如下所示:
for (ZoneOffsetTransitionRule.TimeDefinition c : ZoneOffsetTransitionRule.TimeDefinition.values()) System.out.println(c); |
public static final ZoneOffsetTransitionRule.TimeDefinition UTC
public static final ZoneOffsetTransitionRule.TimeDefinition WALL
public static final ZoneOffsetTransitionRule.TimeDefinition STANDARD
public static ZoneOffsetTransitionRule.TimeDefinition[] values()
for (ZoneOffsetTransitionRule.TimeDefinition c : ZoneOffsetTransitionRule.TimeDefinition.values()) System.out.println(c);
public static ZoneOffsetTransitionRule.TimeDefinition valueOf(String name)
name - 要返回的枚举常量的名称。IllegalArgumentException - 如果该枚举类型没有带有指定名称的常量NullPointerException - 如果参数为空值public LocalDateTime createDateTime(LocalDateTime dateTime, ZoneOffset standardOffset, ZoneOffset wallOffset)
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.
dateTime - the local date-time, not nullstandardOffset - the standard offset, not nullwallOffset - the wall offset, not null