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
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If you forgot your password, you can retrieve your password here.
Password:
Status:
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 13:01:33 2025 UTC