3 ms·
> Send ISO date/time in utc what's an ISO date/time?
by crescentfresh 6y ago
> Send ISO date/time in utc
what's an ISO date/time?
- deleted 6y ago[deleted]
- lyjackal 6y agoI assume GP means ISO8601 Date Time https://en.wikipedia.org/wiki/ISO_8601 https://en.wikipedia.org/wiki/ISO_8601. Default behavior of javascript date json serialization > JSON.stringify(new Date()) '"2021-02-22T20:34:53.686Z"'
- tshaddox 6y agoThen why add the "in UTC" part? ISO 8601 specifies how to designate the time zone.
- uranusjr 6y agoISO 8601 does not contain timezone information, but offset. Timezone info needs to be specified separately, likely as IANA names. It is a common misconception to time zones though, and in a way demonstrates why it’s best practice to always use UTC. When sending/receiving a datetime, no timezone info is available; if timezone is needed, send it separately (and keep the time value in UTC) to save misunderstandings for everyone.
- tshaddox 6y agoI'm aware of the distinction between ISO 8601's time zone designators (which are simply UTC offsets) and other much more complex notions of time zones such as the IANA tz database (which identifies time zones with an "Area/Location" string and contains information about each zone such as daylight saving time rules and even the historical changes in such rules). That said, "time zone designator" is the formal name of the UTC offset in ISO 8601, and it's reasonable to refer to it as such whenever the distinction is clear.
- ehutch79 6y agohttps://en.wikipedia.org/wiki/ISO_8601 https://en.wikipedia.org/wiki/ISO_8601 https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/toISOString https://developer.mozilla.org/en-US/docs/Web/JavaScript/Refe...
- jshprentz 6y agohttps://xkcd.com/1179/ https://xkcd.com/1179/