RE: [PHP-DEV] PHP 4.0 Bug #6425: date() parsing functionality provides unexpected results.
| From: | Mike Robinson | Date: | Wed, 30 Aug 2000 00:18:09 +0000 |
| Subject: | RE: [PHP-DEV] PHP 4.0 Bug #6425: date() parsing functionality provides unexpected results. | ||
| References: | 1 | Groups: | php.dev |
| Request: | Send a blank email to php-dev+get-31179@lists.php.net to get a copy of this message | ||
> -----Original Message-----
> From: hirschf@home.com [mailto:hirschf@home.com]
> Sent: Tuesday, August 29, 2000 7:58 PM
> To: php-dev@lists.php.net
> Subject: [PHP-DEV] PHP 4.0 Bug #6425: date() parsing functionality
> provides unexpected results.
> $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;
> }
You have a $ in front of the parseDate function call, and
an errant single quote to the right of $db_birth_date.
On RHL6.2, the output of the -repaired- snippet is:
September 13, 1969
Regards
.mike