Beefy Boxes and Bandwidth Generously Provided by pair Networks
Do you know where your variables are?
 
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.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://1071031]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others sharing their wisdom with the Monastery: (4)
As of 2024-04-19 13:52 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found