Beefy Boxes and Bandwidth Generously Provided by pair Networks
Pathologically Eclectic Rubbish Lister
 
PerlMonks  

Re: time() question

by tachyon (Chancellor)
on Nov 23, 2004 at 04:18 UTC ( #409806=note: print w/ replies, xml ) Need Help??


in reply to time() question

The shortest module that does this is Time::Local. This conversion is basically all it does.

use Time::Local; $time = timelocal($sec,$min,$hour,$mday,$mon,$year); $time = timegm($sec,$min,$hour,$mday,$mon,$year); my ( $mday, $mon, $year ) = split '/', "01/12/2008"; $mon -= 1; # Time::Local uses months 0..11 like gmtime() and localti +me(). my $epoch_time = timegm(1,0,0,$mday,$mon,$year); # 1 second past midni +ght

cheers

tachyon


Comment on Re: time() question
Download Code

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others rifling through the Monastery: (9)
As of 2014-08-29 18:04 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The best computer themed movie is:











    Results (286 votes), past polls