Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl-Sensitive Sunglasses
 
PerlMonks  

Re^2: Error while using "timelocal ()" function.

by Anonymous Monk
on Aug 25, 2021 at 08:07 UTC ( [id://11136076]=note: print w/replies, xml ) Need Help??


in reply to Re: Error while using "timelocal ()" function.
in thread Error while using "timelocal ()" function.

What was the issue with timelocal()?
Can you please share your solution?

I am getting the same error(Day '' out of range 1..31 script.pl at line2 ), but finding to hard to find the solution?

Code snippet:

use Time::Local; my $time = timegm( $sec, $min, $hours, $mday, $mon, $year );
Thanks.

Replies are listed 'Best First'.
Re^3: Error while using "timelocal ()" function.
by Corion (Patriarch) on Aug 25, 2021 at 08:11 UTC

    Have you looked at what value you are passing to timegm()?

    Most likely, $mday is empty for some reason, as the error message tells you.

Log In?
Username:
Password:

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

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

    No recent polls found