I have a variable called $filename that stores the location of a file. I'm using this code snippet
$filestats = stat($filename);
$thedate = $filestats->mtime;
$datestr = strftime("%Y-%m-%d",$thedate);
when it gets the the "$datestr = etc..." line I get this error:
"- 255 CGI returned nonzero status
Usage: POSIX::strftime(fmt, sec, min, hour, mday, mon, year, wday = -1, yday = -1, isdst = -1) at /kunden/homepages/15/d94236848/htdocs/cgi-bin/newschecker.cgi line 15.
STDOUT OK STDERR OK"
Can someone please tell me what this means. I know I'm not using the strftime itself in a wrong way because I tested it with the localtime system variable and it works. I think the mtime method formats the date so that strftime can't use it. Any help would be greatly appreciated Thanks.
--Paul
$filestats = stat($filename);
$thedate = $filestats->mtime;
$datestr = strftime("%Y-%m-%d",$thedate);
when it gets the the "$datestr = etc..." line I get this error:
"- 255 CGI returned nonzero status
Usage: POSIX::strftime(fmt, sec, min, hour, mday, mon, year, wday = -1, yday = -1, isdst = -1) at /kunden/homepages/15/d94236848/htdocs/cgi-bin/newschecker.cgi line 15.
STDOUT OK STDERR OK"
Can someone please tell me what this means. I know I'm not using the strftime itself in a wrong way because I tested it with the localtime system variable and it works. I think the mtime method formats the date so that strftime can't use it. Any help would be greatly appreciated Thanks.
--Paul