PHP 4.0 Bug #6425: date() parsing functionality provides unexpected results.

From: Date: Tue, 29 Aug 2000 23:58:01 +0000
Subject: PHP 4.0 Bug #6425: date() parsing functionality provides unexpected results.
Groups: php.dev 
Request: Send a blank email to php-dev+get-31177@lists.php.net to get a copy of this message
From: hirschf@home.com Operating system: Windows NT 4.0 Workstation PHP version: 4.0.1pl2 PHP Bug Type: Feature/Change Request Bug description: date() parsing functionality provides unexpected results. On Windows NT, using Apache tested in PHP 4.0.1PL2, 4.0.2 for Win NT using Apache CGI PHP. The function date() with MySQL date format of YYYY-MM-DD HH:MI:SS yields an error when using dates with a value lower than 1970-01-01 00:00:00. The following error is actually reported: Warning: unexpected error in date() in Program.php line XXX Below is a script which reproduces this error: $db_birth_date = "1969-09-13 00:00:00"; $birth_date = $parseDate($db_birth_date',"F j, Y"); function parseDate($date,$format) { $dateString = date($format , strtotime($date)); return $dateString; } Have not tested this issue on UNIX system yet.

« previous php.dev (#31177) next »