bazz
05-30-2008, 10:27 PM
Hi,
I am not getting this to work so I ask for your help, please.
# convert a unix timestamp to a string as 'May 21st 2008';
# for example
sub date_conversion {
use Date::Parse;
my $timestamp = shift;
#strftime uses "%a %b %d %H:%M:%S %Z %Y".
my $finished_date = strftime("%a %Z %Y",$timestamp);
return $finished_date;
}
Currently, this code brings upo this error and I don't understand it.
Usage: POSIX::strftime(fmt, sec, min, hour, mday, mon, year, wday = -1, yday = -1, isdst = -1) at script.pl line 678.
Any pointers most welcome
bazz
I am not getting this to work so I ask for your help, please.
# convert a unix timestamp to a string as 'May 21st 2008';
# for example
sub date_conversion {
use Date::Parse;
my $timestamp = shift;
#strftime uses "%a %b %d %H:%M:%S %Z %Y".
my $finished_date = strftime("%a %Z %Y",$timestamp);
return $finished_date;
}
Currently, this code brings upo this error and I don't understand it.
Usage: POSIX::strftime(fmt, sec, min, hour, mday, mon, year, wday = -1, yday = -1, isdst = -1) at script.pl line 678.
Any pointers most welcome
bazz