In one of our projects, we need to parse some date/times that we are getting back from scans of documents. In about 500 documents, we had about 10 whose date format we couldn't figure out:
D:191040305125916
Was is epoch time? Some kind of offset counter? 100-nanosecond ticks from January 1, 0001?
The 19 at the front is a clue -- it turns out this is a Y2K problem, probably created from the original document creator's bad use of Perl.
The standard Perl time functions return years since 1900. So 1972 is 72, 1999 is 99, but 2003 is 103. The Y2K mistake is to do something like
which will give:
1972, 1999, and 19103 for 2003.
So -- for the date string we saw, the date was 19104 03 05 12 59 16, or March 5th, 2004 12:59:16
The crazy thing was that this bug wasn't found by the document creators four years after it was introduced. And it also reveals how terribly old I am; I was working with Perl back when Y2K was an actual issue.
