在Instant中有方法:toEpochMilli将这个瞬间转换为从1970-01-01T00:00:00Z开始的毫秒数getEpochSecond从1970-01-01T00:00:00Z的Java时代获取秒数。这两种方法都会失去精度,例如在toEpochMilliJavaDoc中我看到:Ifthisinstanthasgreaterthanmillisecondprecision,thentheconversiondropanyexcessprecisioninformationasthoughtheamountinnanosecondswassubjecttointegerdiv