ZonedDateTime withLaterOffsetAtOverlap() example
Description
ZonedDateTime withLaterOffsetAtOverlap()
returns a copy of this date-time changing the zone offset to the later of the two valid offsets at a local time-line overlap.
Syntax
withLaterOffsetAtOverlap
has the following syntax.
public ZonedDateTime withLaterOffsetAtOverlap()
Example
The following example shows how to use withLaterOffsetAtOverlap
.
import java.time.ZonedDateTime;
/*from w w w.j ava2 s . co m*/
public class Main {
public static void main(String[] args) {
ZonedDateTime dateTime =ZonedDateTime.now();
ZonedDateTime l =dateTime.withLaterOffsetAtOverlap() ;
System.out.println(l);
}
}
The code above generates the following result.