if you need to create a string holding a datestamp, please — for the love of everything that’s holy and just and pure in this universe — stop abusing the patience of everyone on this planet, and use the ISO 8601 format.
formats not to use:
- seconds from the epoch – oh please. I mean: come on ((okay, I’m guilty of this insanity as well, but I’m in the process of fixing it)).
- HTTP date – which is defined in two RFCs but it still sucks for small things like sorting or, you know, non-human parsing.
- ctime() output – now, give me a flipping break
and please, don’t even think that people can rely on strptime()
if they want to parse your datestamps — because they might care about something called “timezone” ((a huge FAIL should be photoshopped on top of strptime(3) man page, right near the “Glibc Notes” section, where it says that in most cases the corresponding fields are parsed, but no field in tm is changed
; WTF? what does in most cases mean? you have to tell me in which cases, you fscking idiot!)).
any reference to running web services and their utter lack of clue in this matter is purely coincidental. not.
this blog post should go in the overall discussion about how web services clearly showed me how the bar for writing them has been placed so low that not even “Eleven Inches” Hermes could limbo beneath it. if even a simple, clearly defined data exchange format like JSON has been abused that much ((and I’m looking at you, Tumblr)) then there’s really little hope for the rest of us that care about interoperability and third party application development.