Hacker News new | ask | show | jobs
by kirkthejerk 4512 days ago
I wouldn't trust/believe a programmer who isn't ashamed of something they've done.

In an embedded system, I couldn't think of a nice way to check for the start+end dates for daylight savings time, so I just hard-coded arrays with 10 years worth of dates.

I was eventually surprised to find out that (A) in 2005 the US changed the DST dates, and (B) our system actually survived longer than ten years.

1 comments

I got some code deep in a system somewhere that parsed dates. There are some limitations to the method, but I figured (and still do) it is pretty low risk.

The comment above that code is // god help us if this line is still being run 80 years from today.