#48973 [Opn->Bgs]: gmdate("Y") returns "0000"
| From: | scottmac@php.net | Date: | Sat, 18 Jul 2009 23:29:19 +0000 |
| Subject: | #48973 [Opn->Bgs]: gmdate("Y") returns "0000" | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-139910@lists.php.net to get a copy of this message | ||
ID: 48973
Updated by: scottmac@php.net
Reported By: Michael dot Forman at Colorado dot EDU
-Status: Open
+Status: Bogus
Bug Type: Date/time related
Operating System: Mac OS 10.5.7
PHP Version: 5.2.10
New Comment:
Duplicate of bug #48276
Previous Comments:
------------------------------------------------------------------------
[2009-07-18 23:21:31] Michael dot Forman at Colorado dot EDU
Description:
------------
Within Joomla, called from the "libraries/joomla/utilities/data.php"
library, the function gmdate("Y") returns "0000", whereas gmdate("y")
correctly returns "09". If functions correctly on the command line.
Reproduce code:
---------------
$date = strtotime(gmdate("M d Y H:i:s", time()));
echo $date;
// This returns "Jul 18 0000 23:05:58".
Expected result:
----------------
It should return "Jul 18 2009 23:05:58".
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=48973&edit=1