3 ms·
For time formats, use ISO 8601, and be sure to append a Z to the end to denote UTC (zulu time), and consider rejecting timestamps without it: https://en.m.wiki
by hedora 5y ago
For time formats, use ISO 8601, and be sure to append a Z to the end to denote UTC (zulu time), and consider rejecting timestamps without it:
https://en.m.wikipedia.org/wiki/ISO_8601 https://en.m.wikipedia.org/wiki/ISO_8601
The only real problem with that format is the distasteful "T" in the middle (but, hey, at least it is whitespace-free!)
- j0057 5y agoThe other distasteful thing is getting your hands on the actual ISO 8601 specs is pretty expensive, like 350 CHF, which is weird, because so many national standards bodies gave it official blessing, and so many things in the digital universe depend on it. Maybe that 'T' is optional after all!
- denisw 5y agoThere is RFC 3339, which is essentially “ISO 8601: The Good Parts” and, like all IETF RFCs, freely available: https://www.rfc-editor.org/rfc/rfc3339 https://www.rfc-editor.org/rfc/rfc3339