you are viewing a single comment's thread
view the rest of the comments
[–] 12 points 1 year ago* (last edited 1 year ago) (2 children)

Happily!

So, first epoch time. It's a pretty robust standard, covers many use cases, has few edge cases... but it's specifically for machine usage, since it's not human readable and it's not reversible into the past (pre-1970).

ISO 8601 (depending on the annum), by the text of the documentation, these are all valid dates:

  • 2007-04-05T14:30
  • 2007-04-05T12:30−02:00
  • 2007-04-05T14:30Z
  • 200704051430
  • 07-04-05T14:30
  • 2007-95T14:30

Etc.

RFC 3339 (& RFC 9557, it's newest modification) is actually a subset of ISO 8601 and is far more prescriptive. For example you must have a timezone designator. You must have a separator between the date and time. You must use a dash between date elements and a colon between time elements. You can easily add standardized subseconds.

  • 2007-04-05T12:30−02:00
  • 2007-04-05 14:30Z

This means that RFC 3339 is much easier to parse and use by both machines and humans.

This page (reddit, I know...) has a great summary, and so in the interest of knowledge and attribution I'll link it: https://www.reddit.com/r/ISO8601/comments/p572xy/rfc_3339_versus_iso_8601/

This website allows you to more directly compare the two interactively. https://ijmacd.github.io/rfc3339-iso8601/

  • source
  • parent
  • hideshow 2 child comments