gpt4 book ai didi

javascript - moment().utc().toISOString() 和 moment().utc().format() 有什么区别

转载 作者:行者123 更新时间:2023-11-30 09:53:10 26 4
gpt4 key购买 nike

我正在使用 moment js 库,我对时区的结果感到有点困惑。

moment().utc().toISOString();
"2016-02-08T23:31:45.317Z"

moment().utc().format();
"2016-02-08T23:32:42+00:00"

我不明白的是什么是317ZtoISOStringformat 有什么区别?它们是否相同?

最佳答案

"2016-02-08T23:31:45.317Z"指的是CCYY-MM-DDTHH:MM:SS.sss时间格式。317 是以秒为单位的时间,而 Z 表示“祖鲁时间”(UTC)。

关于javascript - moment().utc().toISOString() 和 moment().utc().format() 有什么区别,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/35281387/

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