如何计算两个日期之间的秒差? 我有这样的: LocalDateTime now = LocalDateTime.now(); // current date and time
LocalDateTime midnight = now.toLocalDate().atStartOfDay().plusDays(1); //midnight
在这种情况下,时间是:now 2017-09-14T0
我写一个辅助方法,该方法日期的字符串表示,并返回时区 例如: input: 2017-11-02T09:30:00-07:00
output : "America/Los_Angeles"
(此处的输入为PST我使用UTC偏差-7:00) Here is my method
public static String getTimeZone(final String date) {