hunt.time.ZoneId

Undocumented in source.

Members

Classes

ZoneId
class ZoneId

A time-zone ID, such as {@code Europe/Paris}. !(p) A {@code ZoneId} is used to identify the rules used to convert between an {@link Instant} and a {@link LocalDateTime}. There are two distinct types of ID: !(ul) !(li)Fixed offsets - a fully resolved offset from UTC/Greenwich, that uses the same offset for all local date-times !(li)Geographical regions - an area where a specific set of rules for finding the offset from UTC/Greenwich apply </ul> Most fixed offsets are represented by {@link ZoneOffset}. Calling {@link #normalized()} on any {@code ZoneId} will ensure that a fixed offset ID will be represented as a {@code ZoneOffset}. !(p) The actual rules, describing when and how the offset changes, are defined by {@link ZoneRules}. This class is simply an ID used to obtain the underlying rules. This approach is taken because rules are defined by governments and change frequently, whereas the ID is stable. !(p) The distinction has other effects. Serializing the {@code ZoneId} will only send the ID, whereas serializing the rules sends the entire data set. Similarly, a comparison of two IDs only examines the ID, whereas a comparison of two rules examines the entire data set.

Meta