December 19th, 2017

Illuminati

Is this the worst date format ever?

I think I just found the worst date format ever.

CVS, in its "Entries" file stores the timestamp that the file was last changed, so that you can check if it has been updated.

The timestamp is formatted like this: "Mon Dec  7 14:59:26 2010"

Now, to a human that's a perfectly readable format. But if you want a computer to understand it you've got to separate it into its component parts which are _completely_ out of order.

ISO 8601 is the international standard. And following that, the format would be "2010-12-20T14:59:26Z". Which is slightly harder to read as a human (because it's all smooshed together), but so much easier to parse with a computer. And has the bonus that if you sort a bunch of dates using normal character order they'll come out correctly.

CVS gets a bit of an out for being created in 1986, 2 years before ISO 8601. But as ISO 3307 was available from 1975, there were standards they totally _could_ have used.

(I can't find details on what the ISO 3307 date-time format looked like, but ISO 2014 said to use YYYY-MM-DD, so I can only assume that ISO 3307 did something reasonably sensible.)

Next task for today: Write a parser for that date format.

(And look forward to a glorious future when I won't have to touch CVS any more.)



Original post on Dreamwidth - there are comment count unavailable comments there.
Illuminati

Interesting Links for 19-12-2017

The top ten movies of 2017 are all remakes or sequels
(tags: movies remake )
First female Bishop of London appointed
(tags: uk women ChurchOfEngland )
Estimates of physical strength determined over 70% of men's bodily attractiveness
(tags: attraction men psychology )
Grenfell Tower fire report finds UK building regulations not fit for purpose
(tags: housing regulation )
Twitter suspends Britain First leaders
(tags: Twitter censorship hate racism )
What are the best soundtracks?
Saved so I can find it again when I need to
(tags: music movies soundtrack )
Birds learn from each other's 'disgust,' enabling insects to evolve bright colors
(tags: evolution birds insects learning )
Poor people forced to attain happiness through spending time with others
(tags: happiness money psychology )
Abandoned rape kits identify over 800 serial rapists in one Michigan county
(tags: rape usa OhForFucksSake )
Artist Creates Amazing Sculptures With Her Natural Hair
(tags: hair sculpture art )
20mph zones are not causing more deaths
(tags: transport death cars )
Queensferry Crossing speed limit will increase from tomorrow
(tags: edinburgh bridge transport scotland )
Interstellar object Oumuamua covered in thick crust of carbon-rich gunk
(tags: space )
Link between brain injuries and criminal behaviour found
(tags: brain crime )
When your friend dies and Facebook hides that from you
(tags: facebook death OhForFucksSake )
Let it go: The Arctic will never be frozen again
(tags: arctic globalwarming )
Belgium ends 19th-Century telegram service
(tags: Technology communication telegraph )
Different countries answer whether life is better or worst than 50 years ago
Quite glad I don't live in Venezuela
(tags: life history happiness society )
So, you've messed up with Git. Here's some tips to recover
(tags: git advice )
Was the Agricultural Revolution a Terrible Mistake? Not If You Take Food Processing Into Account
(tags: agriculture food history society )
Flight rules for git - in-depth guide to carrying out a variety of tasks
(tags: git advice )

Original post on Dreamwidth - there are comment count unavailable comments there.