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 Comment on “Programming sucks

  1. Pingback: Exception Thrown By The Target Of An Invocation - Resolved... Sort Of

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: