php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #48973 gmdate("Y") returns "0000"
Submitted: 2009-07-18 23:21 UTC Modified: 2009-07-18 23:29 UTC
From: Michael dot Forman at Colorado dot EDU Assigned:
Status: Not a bug Package: Date/time related
PHP Version: 5.2.10 OS: Mac OS 10.5.7
Private report: No CVE-ID: None
View Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
If you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: Michael dot Forman at Colorado dot EDU
New email:
PHP Version: OS:

 

 [2009-07-18 23:21 UTC] 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".


Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2009-07-18 23:29 UTC] scottmac@php.net
Duplicate of bug #48276
 
PHP Copyright © 2001-2025 The PHP Group
All rights reserved.
Last updated: Sat Jul 12 15:01:35 2025 UTC