Search code examples
javascriptjsonstringify

Different portions of JSON.stringify(new Date());


2014-07-29T16:55:46.657Z

I believe it to be:

YEAR-MONTH-DAYTHOURS:MINUTES:SECONDS.MILLISECONDSZ

What is the purpose and full name of T and Z?

Do they just serve as escape characters?


Solution

  • T separates date and time; Z specifies a UTC timezone. (In place of it, -08:00 can appear, for example.)