之间的字符是什么意思。和时间戳中的 Z?
What are the meanings of the characters between . and Z in the timestamp?
当我使用
使用当前日期和时间生成时间戳时
new Date().toISOString()
然后我从当前日期和时间获取时间戳 UTC
2021-03-23T11:45:16.939Z
我知道中间的 T 只是分隔符,按照惯例应该在那里
https://en.wikipedia.org/wiki/ISO_8601#Combined_date_and_time_representations
并且 Z 代表零时区,因为它与时区相差 0
https://en.wikipedia.org/wiki/Time_zone#UTC
但我想知道
.
符号和字母Z
之间的字符是什么意思
以我为例 - 939
是毫秒。所以你显示的时间非常接近 11:45:17。它是 11:45:16 和 939 毫秒,这意味着距离 11:45:17 只有 61 毫秒。来自 the specification:
sss
is the number of complete milliseconds since the start of the second as three decimal digits.
当我使用
使用当前日期和时间生成时间戳时new Date().toISOString()
然后我从当前日期和时间获取时间戳 UTC
2021-03-23T11:45:16.939Z
我知道中间的 T 只是分隔符,按照惯例应该在那里 https://en.wikipedia.org/wiki/ISO_8601#Combined_date_and_time_representations
并且 Z 代表零时区,因为它与时区相差 0 https://en.wikipedia.org/wiki/Time_zone#UTC
但我想知道
.
符号和字母Z
之间的字符是什么意思
以我为例 - 939
是毫秒。所以你显示的时间非常接近 11:45:17。它是 11:45:16 和 939 毫秒,这意味着距离 11:45:17 只有 61 毫秒。来自 the specification:
sss
is the number of complete milliseconds since the start of the second as three decimal digits.