Andrew Shitov wrote:
>
> use Time::Local;
>
> $date="10/21/2003";
> $time="18:30";
>
> my ($mon, $mday, $year) = split /\//, $date;
> my ($hour, $min) = split /:/, $time;
> print timelocal (0, $min, $hour, $mday, $mon, $year);
That prints the number of epoch seconds representing November, 21.
-----------------------------------------------------^^^^^^^^
The last line should rather be:
print scalar localtime timelocal(
0, $min, $hour, $mday, $mon - 1, $year);
--
Gunnar Hjalmarsson
Email:
http://www.gunnar.cc/cgi-bin/contact.pl