Actually, timelocal() converts a 6 element list into a time value. localtime() converts a time value into a 9 element list.
Without knowing what the error is, I would suspect that the error is that timelocal() expects the month to be 0-based, and the year to be the offset from 1900.
Also, I would recommend that 'use Time::Local' be used, and not 'require "timelocal.pl"'. (timelocal.pl is implemented in terms of Time::Local, therefore 'require "timelocal.pl"' is unnecessary obscurity)
In reply to Re: Re: timelocal
by MarkM
in thread Error from timelocal
by mkent
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |