[Date Prev][Date Next][Thread Prev][Thread Next] [Search] [Date Index] [Thread Index]

Re: [MacPerl] Time again



darrylc@foothills.eznet.com (Darryl Caldwell) wrote

>Can't say there is much of an interface with Time::Local. I'm going to need
>a bit more of a kick in understanding it's implementation.
>
>
>I tried the following from the synopsis:
>
>use Time::Local;
>
>$time = timelocal($sec,$min,$hours,$mday,$mon,$year);
>
>print $time;
>
>
>and got the following:
>
># Day out of range 1..31 in timelocal.pl
>
>
>
>
>
>
>
>
>Darryl Caldwell             Oikiasuchou School
>___________________________________________________
>The Practice Hall: http://www.eznet.com/bravo/ph/ph.html
>Myth & Martial Culture

Hello,
      Undefined numeric variables are implicitly zero in Perl. Hence, if
you use
the code above all of the variables passed as arguments to timelocal will be
zero. The error message tells you that day is constrained to be a value between
1 and 31. Try the call with permitted values (i.e. initialise some of the
parameters) and see what happens.

Bob

________________________________________________________________
          Bob Wilkinson, Perl Programmer, Pindar plc
Tel: +44 (0)1904 613040    Email: B.Wilkinson@pindar.co.uk
Fax: +44 (0)1904 613110    URL: http://www.connection.co.uk/bob
________________________________________________________________
  I don't speak for my employer - er, they made me say that..
________________________________________________________________