What is your Epoch?
While developing an application to handle Microsoft Excel files, I had a trouble in converting timestamp columns to practical values (i.e., dates in my applications).I then searched for a solution in the source code of a module Iām using,
SimpleXLS
, and the comment on that line puzzled me:
Dates in Excel are stored as number of seconds from an epoch. On
Windows, the epoch is 30/12/1899 and on Mac it's 01/01/1904
What?
Is the epoch something different from what I was used to think about? And to be honest, being grown as a Unix devotee, I thought it was a
time(2)
clearly states:
% man 2 time
...
DESCRIPTION
time() returns the time as the number of seconds since
the Epoch, 1970-01-01 00:00:00 +0000 (UTC).
So, according to Unix, and POSIX, Epoch is set at 1970-01-01, while according to proprietary software it is not. Somehow this does not suprise me at all!
Therefore I searched a little more, and according to this Wikipedia Page on Epoch it seems there are a lot of different epochs around the world.
I think this is the human nature: we cannot agree on religions, why should we agree on times?