var clock = Clock.systemUTC();
System.out.println(clock.instant());
System.out.println(clock.millis());
System.out.println(System.currentTimeMillis());
System.out.println(clock.getZone()); var d = Duration.ofSeconds();
System.out.println(d.toDays());
System.out.println(d.toMinutes());
System.out.println(d.toHours()); var clock2 = Clock.offset(clock,d);
System.out.println(clock2.instant()); var instant = Instant.now(); System.out.println(instant); var instant2 = instant.plusSeconds();
System.out.println(instant2); System.out.println(instant.getEpochSecond());
System.out.println(instant2.getEpochSecond()); var instant3 = Instant.parse("2014-02-23T10:12:35.342Z");
var instant4 = instant3.plus(Duration.ofHours().plusMinutes());
System.out.println(instant4); var instant5 = instant4.minus(Duration.ofDays()); var localDate = LocalDate.now();
System.out.println(localDate); localDate = LocalDate.ofYearDay(,);
System.out.println(localDate); localDate = LocalDate.of(, Month.MAY,);
System.out.println(localDate); var localTime = LocalTime.now();
System.out.println(localTime); localTime = LocalTime.of(,);
System.out.println(localTime); localTime = LocalTime.ofSecondOfDay();
System.out.println(localTime); var localDateTime = LocalDateTime.now();
System.out.println(localDateTime);
var future = localDateTime.plusHours().plusMinutes();
System.out.println(future); var year = Year.now();
System.out.println(year); year = year.plusYears();
System.out.println(year); var ym = year.atMonth();
System.out.println(ym); var md = MonthDay.now();
System.out.println(md); var md2 = md.with(Month.MAY).withDayOfMonth();
System.out.println(md2);

output:

2019-07-26T01:41:36.385911400Z
1564105296390
1564105296390
Z
0
100
1
2019-07-26T03:21:36.390898600Z
2019-07-26T01:41:36.390898600Z
2019-07-26T03:21:36.390898600Z
1564105296
1564111296
2014-02-23T15:16:35.342Z
2019-07-26
2014-05-26
2014-05-21
09:41:36.406855600
23:23
01:31:43
2019-07-26T09:41:36.406855600
2019-07-27T10:44:36.406855600
2019
2024
2024-10
--07-26
--05-23

  

最新文章

  1. TensorFlow中与卷积核有关的各参数的意义
  2. 安装elasticsearch及中文IK和近义词配置
  3. MYSQL安装--小白教程
  4. xll调试方法
  5. [Python] Debugger in Pycharm
  6. 在Web api2 中传递复杂参数的一点心得
  7. Linux如何查找大文件或目录总结-1127
  8. 总结的一些封装好的javascript函数
  9. ssh key报but this does not map back to the address – POSSIBLE BREAK-IN ATTEMPT!错误
  10. Mysql学习(慕课学习笔记2)数据库的创建与删除
  11. 从linux telnet到exchange邮件server来測试发送邮件
  12. 应用java多线程实现server端与多client之间的通信
  13. Android基础知识05—活动的生命周期
  14. 从实战出发,谈谈 nginx 信号集
  15. JDBC (五)
  16. com.mysql.jdbc.Driver 和 com.mysql.cj.jdbc.Driver的区别
  17. python chardet
  18. Python操作MySQL案例
  19. k8s+Jenkins+GitLab-自动化部署asp.net core项目
  20. 【中文分词系列】 4. 基于双向LSTM的seq2seq字标注

热门文章

  1. ORACLE链接SQLSERVER数据库数据操作函数范例
  2. PXC增量恢复添加节点(IST)
  3. python ID3决策树实现
  4. Golang-使用md5对字符串进行加密
  5. 如何回答——请简述MySQL索引类型
  6. 前端js入门之 JavaScript 对象直接量
  7. Jmeter学习笔记(十四)——逻辑控制器
  8. linux设备树的建立过程
  9. C# 利用特性(Attribute)实现通用实体类数据合法校验
  10. ES5_对象 与 继承