Java 8 新特新 工具类 ZonedDateTime
类ZonedDateTime java.lang.Object继承 java.time.ZonedDateTime 所有实现的接口: Serializable , Comparable < ChronoZonedDateTime <?>>, ChronoZonedDateTime < LocalDate >, Temporal , TemporalAccessor public final class ZonedDateTime extends Object 实现 Temporal , ChronoZonedDateTime < LocalDate >, Serializable 带有ISO-8601日历系统中的时区的日期时间,例如 2007-12-03T10:15:30+01:00 Europe/Paris 。 ZonedDateTime 是具有时区的日期时间的不可变表示。 该类将所有日期和时间字段存储为精确度为纳秒的时区以及用于处理模糊的本地日期时间的区域偏移量的时区。 例如,可以将“2007年10月2日在13:45.30.123456789 +02:00在欧洲/巴黎时区”的值存储在a中 ZonedDateTime 。 这个类处理从本地时间线 LocalDateTime 到即时时间线的转换 Instant 。 两条时间线之间的差异是UTC /格林威治的偏移量,用a表示