5 ms·
Because every programming language's library does it slightly different. With the T, without the T, with or without the Z, converted to UTC or not.. Of course i
by skrebbel 15y ago
Because every programming language's library does it slightly different. With the T, without the T, with or without the Z, converted to UTC or not.. Of course it's no rocket science to figure out, but it's work every time.
Notably, JavaScript has no standard way to convert a Date to e.g. 2007-03-01T13:00:00Z.
UNIX timestamps are worse because there's no hint about the timezone (should be UTC but often isn't), plus no space for milliseconds. Of course you can just *1000 for msecs and document that it's UTC, but once again, not trivial.
Basically, you can't just convert a JSON string date into your language's Date(Time) class and be sure that it went right. This is a lot of energy wasted.