ISO 8601 和 [T]、[Z] 字符

ISO 8601 and [T], [Z] characters

[T]和[Z]两个字符表示UTC时间格式是否正确

此外 [T] 只是拆分 日期时间 部分?

var dates = [
  '2016-05-03',         // date only: UTC
  '2016-05-03Z',        // Z character: UTC
  '2016-05-03 00:00',   // exist time, missing T & Z: local
  '2016-05-03 00:00Z',  // exist Z: UTC
  '2016-05-03T00:00',   // exist T: UTC
  '2016-05-03T00:00Z'   // exist Z, T: UTC
];

dates.map(function(d) {  
  document.writeln(d + ':' + Date.parse(d) + '<br />');
});

是的,你是对的:

The T is just a literal to separate the date from the time,

Z 表示 "Zulu time" (UTC)。 From that post.

有关 TZ 的更多信息 wikipedia article on ISO 8601

If the time is in UTC, add a Z directly after the time without a space.