5 ms·
I got so sick of the broken time formats (ALL of them are broken or deficient, including ISO-8601) that I eventually made my own: one in binary [1], and one in
by kstenerud 5y ago
I got so sick of the broken time formats (ALL of them are broken or deficient, including ISO-8601) that I eventually made my own: one in binary [1], and one in text [2].
Time is one of the most difficult things to get right in software engineering.
[1] https://github.com/kstenerud/compact-time/blob/master/compact-time-specification.md#compact-time-format https://github.com/kstenerud/compact-time/blob/master/compac...
[2] https://github.com/kstenerud/concise-encoding/blob/master/cte-specification.md#temporal-types https://github.com/kstenerud/concise-encoding/blob/master/ct... and https://github.com/kstenerud/concise-encoding/blob/master/ce-structure.md#temporal-types https://github.com/kstenerud/concise-encoding/blob/master/ce...
- red0point 5y agoRelevant xkcd: https://xkcd.com/927/ https://xkcd.com/927/
- kstenerud 5y agoYes, it's unfortunate that people have latched onto that xkcd comic as their preferred way to dismiss new things out of hand without expending any energy on critical thought. We should start calling them the "927 club".
- red0point 5y agoInstead of feeling personally attacked and resorting to pettiness, maybe you could instead start by explaining why existing standards are bad and why your proposed standard is superior. The xkcd pretty neatly summarized the situation as of now. You developed and self-promote a new standard but do not explain why anyone should care.
- JauntyHatAngle 5y agoI think it's less about the xkcd (I had similar thoughts but hadn't looked at the linked standard so don't know if it's justified), and more that simply linking the xkcd is not really enough discussion to justify it as a neat summary. Linked in context with other response points and it's a worthy reference, but dropped without much further discussion and the onus feels like it remains on you to justify it.
- red0point 5y agoHe proposes a new standard in his repo. He doesn‘t explain why it‘s better (not in the repo, nor in the comment), just mentions that all others are bad. I call him out for just re-inventing the wheel by mentioning the xkcd. He proposes a new standard in his repo. He doesn‘t explain why it‘s better (not in the repo, nor in the comment), just mentions that all others are bad. I call him out for just re-inventing the wheel by mentioning the xkcd. And indeed, critical self-reflection is necessary when developing a standard - why is it necessary? What does it do better? Otherwise, it‘s just as in the xkcd - a standard that nobody will ever use. And instead of explaining just that he choses to attack me. But you‘re right, a little accompanying text wouldn‘t have hurt.
- red0point 5y agoEdit: I‘m on mobile so sorry about that weird comment repeating the same thing again and again, I was rewriting these paragraphs a few times, should‘ve come out as one. Oh well.
- mjw1007 5y agoI can't speak for kstenerud, but looking at the compact-time github page they appear to have written a solution that meets their own needs, and kindly made it available to the world for free. They don't appear to be attempting to cover all use cases (in particular, it isn't trying to be human-readable), and crucially they don't appear to be proposing it as a standard.
- bawolff 5y agoTo me this sounds like one of the most quintessential examples of that xkcd. Yes sometimes its overused, but that doesn't mean its never right.
- someguydave 5y agoneat, thank you for this work.
- EdwardDiego 5y agoWhat about RFC3339? It's a strict subset of ISO8601.
- kstenerud 5y agoIt's definitely a big step up from ISO8601 (removal of useless stuff, stricter rules, no defaulting to local time), but it still lacks time zone information. Since internet protocols are almost always talking in terms of events when it comes to time (and almost always in the past), RFC3339 is fine for its purpose. But for other uses of time it's not enough. I did up a little summary of use cases here: https://github.com/kstenerud/compact-time/blob/master/compact-time-specification.md#how-to-keep-time https://github.com/kstenerud/compact-time/blob/master/compac...
- XorNot 5y agoI'll just be happy if we can get the world using YYYY-MM-DD by default for dates. It's completely unambiguous in every context, and reads and sorts better for humans then any other format.
- gumby 5y agoThat’s ISO-8601 referred to in the comment
- deleted 5y ago[deleted]
- thehappypm 5y agoDoesn't handle Smarch very well though.
- contravariant 5y agoIMHO the worst mistake in ISO-8601 was flipping the sign on the time-zone offset. I'll never understand why someone decided 02:00+01:00 should equal 01:00Z not 03:00Z.
- Arnavion 5y agoI believe the concept of +01:00 meaning 1 hour ahead of Greenwich already existed before ISO8601.
- CodesInChaos 5y agoDefining CET as UTC+01:00 makes sense, because you get the local time by adding an hour to UTC. And then you extend that convention to timestamps, where you include a timezone indicator, not an arithmetic expression.
- contravariant 5y agoWell yeah CET = UTC + 01:00 makes sense. If UTC=02:00 then you'd get CET = 02:00 + 01:00 = 03:00, which all works out nicely. Solving for UTC would then give UTC = CET-01:00. So if you want something equivalent to UTC without explicitly denoting the timezone it'd make more sense to denote 03:00 CET as 03:00-01:00 rather than 03:00+01:00. I mean sure technically you're appending the timezone, but if you omit all the detail that makes it clear that it is a timezone then I just think it looks silly.
- Joker_vD 5y agoBecause it tells you how to go from local time to UTC — and a change-of-basis transformation A from old to new is defined to be such a transformation that x_old = A x_new , not the other way around, x_new = A x_old . So, you have 02:00 in some local time, and you want to go to UTC? The change-of-basis transformation is "add 1 hour", because 01:00 (in UTC) plus 1 hour results in 02:00 (in local time), all perfectly reasonable, from an algebraist's point of view.
- rsstack 5y agoFYI: Your personal site's certificate expired almost a month ago.