Syntax: YYYY-MM-DDTHH:MM:SSZ+HH:MM eg:2018-10-19T03:00:00.000Z
This consists 4 parts:
YYYY-MM-DD
: Standard Gregorian calendar dateT
: Date-time delimiter, it seperates the date from the timeHH:MM:SS:SSS
: Standard time representation in 24hr format. SecondsSS
and millisecondsSSS
may be ommited for brevityZ
: Represents UTC Timezone with zero offset. (Fun fact: UTC stands for Coordinated universal time)+HH:MM
: Which comes after theZ
is the offset for UTC. Omitting this means 0 offset.
Try Natty if you still need help visualising, it has a parser for ISO8601 dates.
eg. Mon, 21 Mar 2011 00:18:56 +0000
See more at IETF-compliant RFC 2822
-
JavaScript date
-
Evaluates using the client's clock as time reference, based on time value in milliseconds since midnight 1 January 1970 00:00:00 UTC.
Date.now() //->1511232956323 new Date(1511232956323) //->Tue Nov 21 2017 10:55:56 GMT+0800 (+08)
-
ECMAScript defines a dateString interchange format for date-times based upon:
- A simplification of the ISO 8601 Extended Format
new Date('1995-12-17T03:24:00') //->Sun Dec 17 1995 03:24:00 GMT+0800 (+08)
- IETF-compliant RFC 2822 timestamps
new Date('30 October 1930') //->Thu Oct 30 1930 00:00:00 GMT+0800 (+08)
-
-
There is no time difference between GMT and UTC
-
Coordinated Universal Time (UTC)
UTC is a standard, NOT a time zone. A standard to represent date and time in 24 hours format and used globally as a basis for their own civil time / timezones.
-
Greenwich Mean Time (GMT)
A time zone, officially used in some European and African countries. Can be represented in 24/12 hr formats.
-
Unix Epoch == Unix TimeStamp == POSIX Time
It represents the number of seconds that have elapsed since January 1, 1970 (midnight UTC/GMT), not counting leap seconds (in ISO 8601: 1970-01-01T00:00:00Z). Literally speaking the epoch is Unix time 0 (midnight 1/1/1970), but 'epoch' is often used as a synonym for 'Unix time'.
-
Locale
Quoting from wiki: "In computing, a locale is a set of parameters that defines the user's language, region and any special variant preferences that the user wants to see in their user interface. Usually a locale identifier consists of at least a language identifier and a region identifier."
Read more about it on this blog
Sources: