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


Hey Guys,

Just got a chance to modify my code. Thanks again, it worked great!
It's funny, it always seems that it's the little easy things that give the most trouble haha...


Thanks Again, Matt
  • Comment on Re: Error while using "timelocal ()" function.

Replies are listed 'Best First'.
Re^2: Error while using "timelocal ()" function.
by ikegami (Patriarch) on Sep 01, 2011 at 20:27 UTC
    It's a common mistake that goes to show that interfaces should be designed for people, not computers.
Re^2: Error while using "timelocal ()" function.
by Anonymous Monk on Aug 25, 2021 at 08:07 UTC
    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.

      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.