Programming sucks

I ran across this question on stack overflow while (still) trying to figure out date parsing. The summary:

Q: I’m trying to get an NSDate object that has 21:00 as the local time[…] The result is 0001-01-02 04:52:58 +0000

A: The problem is that railroad time wasn’t implemented until November 18, 1883. You’re neglecting to set a year so you’re getting a date before that. Prior to the implementation of railroad time, the US time zones weren’t exact hour differences from GMT. I’m not sure exactly what time zone Apple selects for you but whichever it was seems to have been adjusted by 7 minutes and 2 seconds upon the move to PST in 1883.

WTF

And it made me remember an article I read yesterday: Programming Sucks. If you’re not a programmer, you’ll get a glimpse of what it entails. If you are one, you’ll probably laugh. Go read it.

One thought on “Programming sucks

Leave a Reply