Hacker News new | past | comments | ask | show | jobs | submit login

> * Human readable

Computers are the main consumers of APIs, and ISO 8601 is far from machine-readable.

For example, in Elixir, DateTime.from_iso8601/1 won't recognize "2022-03-12T07:36:08" even though it's valid. I had to rewrite a chunk of Python's radidjson wrapper to 1-9 digit fractional seconds (1).

I'm willing to bet 99% of ISO8601 will fail to handle all aspects of the spec. So when you say "ISO8601" what you're really saying is "our [probably undocumented, and possibly different depending on what system you're hitting] version of the ISO-86001 spec."

(1) https://github.com/python-rapidjson/python-rapidjson/pull/13...




> what you're really saying

No.

The specific profile of ISO8601 that should be used to express timestamps in an API is that defined in RFC3339.

Choosing to use a half-baked parser is a separate matter.




Consider applying for YC's W25 batch! Applications are open till Nov 12.

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: