In the previous recipe, How to construct time zone-independent date and time instances, we constructed date and time objects that didn't contain any time zone information. They implicitly represented the values in the system's time zone; these classes were java.time.LocalDate, java.time.LocalTime, and java.time.LocalDateTime.
Often we would need to represent the time with respect to some time zone; in such scenarios we will make use of java.time.ZonedDateTime, which contains time zone information along with java.time.LocalDateTime. The time zone information is embedded using java.time.ZoneId or java.time.ZoneOffset instances. There are two other classes, java.time.OffsetTime and java.time.OffsetDateTime, which are also time zone-specific variants for java.time.LocalTime and java.time.LocalDateTime.
In this recipe...