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.
withLaterOffsetAtOverlap
has the following syntax.
public ZonedDateTime withLaterOffsetAtOverlap()
The following example shows how to use withLaterOffsetAtOverlap
.
import java.time.ZonedDateTime; 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.