Beefy Boxes and Bandwidth Generously Provided by pair Networks
There's more than one way to do things
 
PerlMonks  

Re: how to calculate time that looks like 1138597506

by davorg (Chancellor)
on Feb 08, 2007 at 17:01 UTC ( [id://599059]=note: print w/replies, xml ) Need Help??


in reply to how to calculate time that looks like 1138597506

That's the time given as the number of seconds since midnight, Jan 1st 1970 GMT (known as the epoch). Perl will give the current value for that number using the time function.

You can convert from that number back to a more human-understandable representation using localtime or gmtime.

You can create one of these "epoch seconds" numbers for a given date and time using the timelocal or timegm functions from the Time::Local module.

  • Comment on Re: how to calculate time that looks like 1138597506

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others examining the Monastery: (8)
As of 2024-04-16 18:27 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found