public static enum ZoneRulesBuilder.TimeDefinition extends Enum<ZoneRulesBuilder.TimeDefinition>
Time zone rules are expressed in one of three ways:
Enum Constant and Description |
---|
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.
|
Modifier and Type | Method and Description |
---|---|
OffsetDateTime |
createDateTime(LocalDateTime dateTime,
ZoneOffset standardOffset,
ZoneOffset wallOffset)
Creates the offset date-time from the specified local date-time.
|
static ZoneRulesBuilder.TimeDefinition |
valueOf(String name)
Returns the enum constant of this type with the specified name.
|
static ZoneRulesBuilder.TimeDefinition[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final ZoneRulesBuilder.TimeDefinition UTC
public static final ZoneRulesBuilder.TimeDefinition WALL
public static final ZoneRulesBuilder.TimeDefinition STANDARD
public static ZoneRulesBuilder.TimeDefinition[] values()
for (ZoneRulesBuilder.TimeDefinition c : ZoneRulesBuilder.TimeDefinition.values()) System.out.println(c);
public static ZoneRulesBuilder.TimeDefinition valueOf(String name)
name
- the name of the enum constant to be returned.IllegalArgumentException
- if this enum type has no constant with the specified nameNullPointerException
- if the argument is nullpublic OffsetDateTime createDateTime(LocalDateTime dateTime, ZoneOffset standardOffset, ZoneOffset wallOffset)
This method converts a local date-time to an offset date-time using an algorithm based on the definition type. The UTC type builds the offset date-time using the UTC offset. The STANDARD type builds the offset date-time using the standard offset. The WALL type builds the offset date-time using the wall offset. The result always uses the wall-offset, thus a conversion may occur.
dateTime
- the local date-time, not nullstandardOffset
- the standard offset, not nullwallOffset
- the wall offset, not nullCopyright © 2014. All rights reserved.