PHP 4.0 Bug #2155 Updated: amusing interaction between date() and filemtime(), when filemtime() is false
| From: | jimw@php.net | Date: | Sat, 10 Feb 2001 18:40:22 +0000 |
| Subject: | PHP 4.0 Bug #2155 Updated: amusing interaction between date() and filemtime(), when filemtime() is false | ||
| Groups: | php.dev | ||
| Request: | Send a blank email to php-dev+get-46193@lists.php.net to get a copy of this message | ||
ID: 2155
Updated by: jimw
Reported By: seth@psy.au.dk
Old-Status: Open
Status: Closed
Bug Type: Feature/Change Request
Assigned To:
Comments:
date takes an int, false gets converted to 0, and that is 1.1.1970.
Previous Comments:
---------------------------------------------------------------------------
[1999-08-25 17:24:35] seth@psy.au.dk
The following code fragment should be self-explanatory
$dbtime=date("d-m-Y", filemtime("/var/lib/mysql/sample/DBase.ISD"));
print "(Databases last updated: " . $dbtime . ")n"
Recently I moved the script to another machine, where the file named
in filemtime did not exist.
The result:
(Databases last updated: 01-01-1970)
No big deal. But maybe date() should respond to whatever
filemtime() returns ( "false" according to the man page) with
an error message.
Cheers,
Seth
---------------------------------------------------------------------------
ATTENTION! Do NOT reply to this email!
To reply, use the web interface found at http://bugs.php.net/?id=2155&edit=2