Beefy Boxes and Bandwidth Generously Provided by pair Networks
Syntactic Confectionery Delight
 
PerlMonks  

Re: getting answer 70 years off

by dwm042 (Priest)
on Jan 17, 2014 at 22:48 UTC ( [id://1071031] : note . print w/replies, xml ) Need Help??


in reply to getting answer 70 years off

From the documentation for Time::Local in CPAN:

This module provides functions that are the inverse of built-in perl functions localtime() and gmtime(). They accept a date as a six-element array, and return the corresponding time(2) value in seconds since the system epoch (Midnight, January 1, 1970 GMT on Unix, for example).

The difference between system epoch start (1970) and the localtime conversion point (1900) appears to account for your missing 70 years.

dwm042

Replies are listed 'Best First'.
Re^2: getting answer 70 years off
by boftx (Deacon) on Jan 17, 2014 at 23:31 UTC

    IIRC, Mac OS set the epoch at Jan 1, 1900 for some reason.

    It helps to remember that the primary goal is to drain the swamp even when you are hip-deep in alligators.