gpt4 book ai didi

Java时间: How to interpret time of ISO_DATE_TIME format

转载 作者:行者123 更新时间:2023-12-01 17:45:51 24 4
gpt4 key购买 nike

我不太明白这个日期格式是什么意思:

2019-05-01T02:00:00+02:00[Europe/Madrid]

使用 ISO_DATE_TIME DateTimeFormatter 进行格式化。

其背后的代码是:

public void meth(Date d) {
LOG.info(date.toInstant()
.atZone(ZoneId.systemDefault())
.format(DateTimeFormatter.ISO_DATE_TIME)
);
}

这是否意味着马德里时间是 00:00:00 或 02:00:00?

我的意思是,马德里市民看钟的时间是几点?

最佳答案

马德里的时间是 02:00:00。 +02:00 是相对于 UTC 的偏移量,所以 UTC 时间为 00:00:00。

关于Java时间: How to interpret time of ISO_DATE_TIME format,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/55469839/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com