Submission + - Still getting bit by Y2K bug. Why haven't we learn
unimacs writes: I work with data loggers of various types and I use perl to parse the information. I rely heavily on the str2time function to parse the timestamps. It works pretty well except that I was getting strange errors with a new logger file format I was processing.
It turns out that the logger was outputting dates like "9/24/11 10:27:30 AM". On my OSX development machine, perl and str2time (via timelocal) interpreted that date as September 24, 2011. On our linux production server, it was interpreted as September 24th, 1911.
Have we already forgotten that 2 digit years are no-no? Anybody else running into these kinds of problems?
It turns out that the logger was outputting dates like "9/24/11 10:27:30 AM". On my OSX development machine, perl and str2time (via timelocal) interpreted that date as September 24, 2011. On our linux production server, it was interpreted as September 24th, 1911.
Have we already forgotten that 2 digit years are no-no? Anybody else running into these kinds of problems?