to Zoned Date Time Interval
Converts this interval to a ZonedDateTimeInterval using the specified strategy to adjust each endpoint to a valid date, time, and offset in zone.
OffsetConversionStrategy.PRESERVE_INSTANT - Preserve the instant captured by the date, time, and offset, ignoring the local time.
OffsetConversionStrategy.PRESERVE_LOCAL_TIME - Preserve the local date and time in the new time zone, adjusting the offset if needed.
Alternatively, you can use asZonedDateTimeInterval to convert each endpoint to a ZonedDateTime with an equivalent fixed-offset zone. However, this comes with the caveat that a fixed-offset zone lacks knowledge of any region and will not respond to daylight savings time changes.
See also
Converts a string to a ZonedDateTimeInterval.
The string is assumed to be an ISO-8601 time interval representation in extended format. The output of ZonedDateTimeInterval.toString can be safely parsed using this method.
Examples:
1990-01-04T03-05[America/New_York]/1991-08-30T15:30:05.123-04:00../1991-08-30T15:30:05.123-04:001990-01-04T03-05[Europe/London]/..../..(empty string)
Throws
if parsing fails
if the parsed time is invalid
Converts a string to a ZonedDateTimeInterval using a specific parser.
A set of predefined parsers can be found in DateTimeParsers.
Throws
if parsing fails
if the parsed interval is invalid