javascript “yyyy-mm-ddT00:00:00.000Z”的“.000Z”是什么意思?
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/16151383/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
What does the ".000Z" of "yyyy-mm-ddT00:00:00.000Z" mean?
提问by A. Perez Cera
I've gotten a response from one application with the following date & time format:
我收到了一个应用程序的回复,其日期和时间格式如下:
yyyy-mm-ddT00:00:00.000Z
yyyy-mm-ddT00:00:00.000Z
I need date and time for a report I have to present. What does the .000Z mean? What do I need to do to get the time according to a region using javascript?
我需要提交报告的日期和时间。.000Z 是什么意思?我需要做什么才能根据使用 javascript 的区域获取时间?
回答by Chris Card
.000 is the fraction of a second and Z indicates UTC timezone.
.000 是一秒的分数,Z 表示 UTC 时区。
How you convert to your local time will depend on which programming language you prefer, but for example Perl has standard modules for parsing and formatting times.
您如何转换为本地时间取决于您喜欢哪种编程语言,但例如 Perl 具有用于解析和格式化时间的标准模块。