I'm of the camp that feels perl should have a fixed epoch rather than the
epoch of the underlining OS. Furthermore, I can understand that the OS
epoch can also be important when looking outside of perl. Thinking this
over for a while it occurred to me that time() currently has no arguments
and that an epoch argument would seemingly solve all our problems.
time() - returns seconds since Perl epoch
time("sys") - seconds since start of OS epoch
time("tai") - seconds since TAI began
time("jul") - seconds since julian day 0
time("vms") - seconds since VMS epoch (MJD 0)
time("wall") - seconds since Larry Wall was born
etc.
The only assumption here is that time() returns seconds (not necessarily
integers) from an epoch and that Perl epoch is the thing expected by the
localtime() replacement. Whether time() returns fractioanl seconds or a
libtai object (with seconds and nanoseconds) is another issue. All of
these are simply integer second offsets from each other.
--
Tim Jenness
JCMT software engineer/Support scientist
http://www.jach.hawaii.edu/~timj