字符串转LocalTime再转Instant

LocalTime a= LocalTime.parse("20:13:01");
// LocalTime a= LocalTime.now();
System.out.println(a);
System.out.println(LocalDate.now().atTime(a).atZone(ZoneId.systemDefault()).toInstant());

posted @ 2018-05-14 20:18  tonggc1668  阅读(1024)  评论(0编辑  收藏  举报