版权声明
- 本文原创作者:谷哥的小弟
- 作者博客地址:http://blog.csdn.net/lfdfhl
ZonedDateTime概述
ZonedDateTime常用于表示带有时区的日期和时间。
ZonedDateTime示例
import java.time.ZonedDateTime;
public class TestZonedDateTime {
public static void main(String[] args) {
ZonedDateTime zonedDateTime = ZonedDateTime.now();
System.out.println(zonedDateTime.toString());
}
}
2017-10-03T21:10:12.887+08:00[Asia/Shanghai]