php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #48651 date('Y') does not return the correct year
Submitted: 2009-06-22 20:02 UTC Modified: 2009-06-22 22:35 UTC
Votes:2
Avg. Score:4.5 ± 0.5
Reproduced:2 of 2 (100.0%)
Same Version:2 (100.0%)
Same OS:1 (50.0%)
From: dietmar dot rieder at tugraz dot at Assigned:
Status: Not a bug Package: Date/time related
PHP Version: 5.2.10 OS: Solaris 9 (sparc)
Private report: No CVE-ID: None
 [2009-06-22 20:02 UTC] dietmar dot rieder at tugraz dot at
Description:
------------
On Sparc Solaris 9 date('Y') does not return the correct date.

#uname -a
SunOS webmail02 5.9 Generic_118558-11 sun4u sparc SUNW,Sun-Fire-480R
#  date +'%Y'
2009
# php  -v -n
PHP 5.2.10 (cli) (built: Jun 19 2009 14:42:42)
Copyright (c) 1997-2009 The PHP Group
Zend Engine v2.2.0, Copyright (c) 1998-2009 Zend Technologies
#  php  -n
<?
print date('Y');
?>
0000

In php-5.2.9 the problem did not exist, it is also not existing in php-5.2.10 on Solaris 10 (x86)


Reproduce code:
---------------
<?
print date('Y');
?>

Expected result:
----------------
2009

Actual result:
--------------
0000

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2009-06-22 20:58 UTC] derick@php.net
Please try using this CVS snapshot:

  http://snaps.php.net/php5.3-latest.tar.gz
 
For Windows:

  http://windows.php.net/snapshots/
 [2009-06-22 22:35 UTC] scottmac@php.net
Duplicate of http://bugs.php.net/bug.php?id=48276

Fixed in CVS.
 
PHP Copyright © 2001-2025 The PHP Group
All rights reserved.
Last updated: Mon Jul 21 23:00:03 2025 UTC