m-6ren">
gpt4 book ai didi

javascript - 伦敦时间的日期与格林威治标准时间不同

转载 作者:行者123 更新时间:2023-11-29 20:52:21 24 4
gpt4 key购买 nike

使用 JavaScript 库 moment-timezone,为什么这两个语句的计算结果不都为 0?

> moment("1970-01-01 00:00:00 GMT").unix()
0

> moment.tz("1970-01-01 00:00:00", "Europe/London").unix()
-3600

一开始我以为是夏令时的缘故,但伦敦在冬天肯定和格林威治标准时间一样吗?

最佳答案

这是正确的输出。 1970 年,伦敦比 UTC 早一小时。

引用这里: https://www.timeanddate.com/time/zone/uk/london?year=1970

关于javascript - 伦敦时间的日期与格林威治标准时间不同,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/51257863/

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