[乐意黎原创] 时间格式 yyyy-MM-dd'T'HH:mm:ss.SSSZ 中的T和Z表示什么

乐意黎这久在关注一个地方域名( ***.ren,由于某些因素,此处用 *** 来代表域名),因域名已经过期,有打算抢注的意愿,就等删除后注册了。

( ***.ren)

注册日期 2014年10月15日 
到期日期 2017年10月30日
到期日期 10月30日


2017.11.08 未删
2017.11.28 未删
2017.11.30 未删
2017.12.01 未删

2017.12.02 未删

2017.12.03 未删

2017.12.04 未删


无耐,今早10点多一看,域名竟然注册了。

突然间这种失落啊。。。 关注这么久,竟然失之交臂了。。。
有点欲哭无泪,万念俱灰的感觉
 
 
 
 (***.ren) 
 
Updated Date:2017-12-04T18:07:57Z
Creation Date:2017-12-04T18:07:44Z
Registry Expiry Date:2018-12-04T18:07:44Z
 
 

换算成北京时间:

 
 
Updated Date:2017-12-05 00:07:57
Creation Date:2017-12-05 00:07:44
Registry Expiry Date:2018-12-05 00:07:44

 
 
 
 
折腾了下,突然明白了。原来是5号的0时左右抢注的啊, 
哎,这久白白关注了。
 
 
 
 
一直没怎么在意和关注域名展示的这种时间格式,请原谅我多见不怪, 哎。
 
 
 
 

自己没有深刻理解 yyyy-MM-dd'T'HH:mm:ss.SSSZ 中的T和Z所表示的含义。


下面来着重学习一下:

Date Time String Format

ECMAScript defines a string interchange format for date-times based upon a simplification of the ISO 8601 Extended Format. The format is as follows: YYYY-MM-DDTHH:mm:ss.sssZ

Where the fields are as follows:

YYYY is the decimal digits of the year 0000 to 9999 in the Gregorian calendar.
- "-" (hyphen) appears literally twice in the string.
MM is the month of the year from 01 (January) to 12 (December).
DD is the day of the month from 01 to 31.
T "T" appears literally in the string, to indicate the beginning of the time element.
HH is the number of complete hours that have passed since midnight as two decimal digits from 00 to 24.
: ":" (colon) appears literally twice in the string.
mm is the number of complete minutes since the start of the hour as two decimal digits from 00 to 59.
ss is the number of complete seconds since the start of the minute as two decimal digits from 00 to 59.
. "." (dot) appears literally in the string.
sss is the number of complete milliseconds since the start of the second as three decimal digits.
Z is the time zone offset specified as "Z" (for UTC) or either "+" or "-" followed by a time expression HH:mm



上面这个带T和Z这种是ISODATE .


因为北京处于东八区.我们北京时间UTC+8

所以,转换成北京时间需要加上 8 个小时


Updated Date:2017-10-20T02:59:25Z 转换成北京时间就是 2017-10-20 10:59:25


 
 
Creation Date:2015-08-03T07:21:33Z 转换成北京时间就是 2015-08-03 15:21:33

 
 
 
 
 
 

至此,算是明白了。

 
 
 
 
参考网址: http://www.ecma-international.org/ecma-262/6.0/#sec-date-time-string-format
 
 
 
 


乐意黎原创
本文地址:  http://blog.csdn.net/aerchi/article/details/78717232

猜你喜欢

转载自blog.csdn.net/aerchi/article/details/78717232