RE: [PHP] Windows Time modification 12/31/1969???
| From: | John Huggins | Date: | Fri, 02 Feb 2001 20:30:16 +0000 |
| Subject: | RE: [PHP] Windows Time modification 12/31/1969??? | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-37898@lists.php.net to get a copy of this message | ||
Not sure, but I think NT may not report the last modified data resulting in
a unixtime of 0 which would be 12/31/1969 I believe.
> -----Original Message-----
> From: Joe [mailto:phplist@koston.net]
> Sent: Friday, February 02, 2001 3:14 PM
> To: php-general@lists.php.net
> Subject: [PHP] Windows Time modification 12/31/1969???
>
>
> I'm opening the files in a directory, and trying to find the most
> recent modification date. The problem is that I'm getting the date
> of 12/31/1969 for all my files, and when I try to print out the
> modification
>
> timestamp from filemtime directly I get nothing.
>
> If you look at the code you can see. Nothing is printed out at print
> $fileDate.
> It is a windows NT system could this be the problem. Having troubles
> with the UNIX timestamp?
>
> while (false!=($file = readdir($handle))) { // read all files in dir
>
> if ($file != "." && $file != "..") { // only if file is not . or
> ..
> $fileDate = filemtime($file); // get date from file
> $newDate = filemtime($newFile); // get date from newFile
>
> print $fileDate;
>
> if ($newDate < $fileDate) { // if file is newer
> $newFile = $file; // replace newFile with
> newer file
> }
> }
> }
>
>
>
>
>
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: php-general-unsubscribe@lists.php.net
> For additional commands, e-mail: php-general-help@lists.php.net
> To contact the list administrators, e-mail: php-list-admin@lists.php.net
>