我尝试过:
LocalDateTime.ofInstant(dateTime.toInstant(), ZoneId.systemDefault()))
但是它给出了编译时错误:
The method ofInstant(java.time.Instant, java.time.ZoneId) in the type LocalDateTime is not applicable for the arguments (org.joda.time.Instant, java.time.ZoneId)
此作品:
LocalDateTime.ofInstant(Instant.ofEpochMilli(startDateTime.getMillis()), ZoneId.systemDefault()))