According to [Wikipedia][iso8601-wiki]:
ISO 8601 is an international standard covering the worldwide exchange and communication of date and time-related data. It is maintained by the Geneva-based International Organization for Standardization (ISO) and was first published in 1988, with updates in 1991, 2000, 2004, and 2019, and an amendment in 2022.
To put it simply, the format is YYYY-MM-DDTHH:MM:SSZ
.
Where:
YYYY
is the yearMM
is the monthDD
is the dayHH
is the hourMM
is the minuteSS
is the second
SS
can be a decimal number so SS.SSS
is also validZ
is the timezone offset
Z
is UTC+HH:MM
is a positive offset from UTC-HH:MM
is a negative offset from UTC+01:00
is one hour ahead of UTC, and is also Central European Time (CET)The standard also allows for partial dates, such as YYYY-MM
or YYYY
.
Basically,
any omitted part is assumed to be the lowest possible value for that part.
So omitting the seconds part of the time, YYYY-MM-DDTHH:MMZ
is valid,
But omitting the year, --MM-DDTHH:MMZ
is not.