Beefy Boxes and Bandwidth Generously Provided by pair Networks
Do you know where your variables are?
 
PerlMonks  

Re^3: convert it to unix time stamp

by Not_a_Number (Parson)
on Feb 21, 2014 at 20:06 UTC ( #1075778=note: print w/ replies, xml ) Need Help??


in reply to Re^2: convert it to unix time stamp
in thread convert it to unix time stamp

You don't really need any module other than core Time::Local.

use Time::Local; use 5.010; my ( $month, $year ) = ( gmtime($^T) )[ 4, 5 ]; my @month_days = ( 5, 16, 20 ); say timegm( 59, 59, 23, $_, $month, $year ) for @month_days;

In addition, that sort of simplifies things, doesn't it?

Update: Linkified Time::Local


Comment on Re^3: convert it to unix time stamp
Select or Download Code

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others taking refuge in the Monastery: (10)
As of 2015-07-04 15:55 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The top three priorities of my open tasks are (in descending order of likelihood to be worked on) ...









    Results (60 votes), past polls