ZonedDateTime

If you need to represent a date/time and a timezone, then ZonedDateTime is the class you need. As you might expect, this class' interface is a combination of LocalDate and LocalTime, with extra methods added for handling the timezone.

As shown at length in the overview of duration's API (and hinted at, though not as clearly shown in the other classes), one of the strong points of this new API is the ability to manipulate and process various date and time artifacts mathematically. It is precisely this functionality that we will spend most of our time with in this project as we explore this new library.

Get Java 9: Building Robust Modular Applications now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.