- Mar 22, 2012
- by Dave Matteson
If you’ve been running or developing websites for awhile, you may have run into a problem where a field that should contain a more recent date is instead showing up with the date 12-31-1969. Many people may just recognize this as a problem, get it resolved somehow and move on. But have you ever stopped to wonder just why this specific date is the one that shows up when there’s an issue?
So What’s The Deal With 12/31/1969?
This occurs when data that should be a UNIX timestamp is instead either empty or contains a value of zero. UNIX timestamps are integers that count the number of seconds since midnight on December 31, 1969. As you can imagine, nowadays they’re pretty big.
Sometimes a bug in the software will cause these fields to lose their value — maybe during a software update or database migration — and that’s when you see the epoch date (12-31-1969) instead of the value you were expecting. The good news is the software which is rendering out the timestamp to human readable format is doing its job (a timestamp of zero does correlate to that date). The bad news is you’ve got missing values which are going to have to be tracked down.
Why December 31, 1969?
So the obvious question is why this particular date? Well it’s very early in UNIX’s history (though this date wasn’t actually chosen until 1972), and basically it just seemed to be a good starting point to begin counting from. It’s amazing how many of the standards we live by today were chosen almost arbitrarily sometime in the past!