Re:Ask HN: Do you have any code currently in production that...
by swalsh on Thursday February 13, 2014 @12:33PM
(#7232707)
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.
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.