|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #15005 Date bug with two and four digit year
Submitted: 2002-01-11 20:04 UTC Modified: 2002-02-02 06:35 UTC
Avg. Score:4.0 ± 0.0
Reproduced:1 of 1 (100.0%)
Same Version:1 (100.0%)
Same OS:1 (100.0%)
From: shellum at amirani dot com Assigned:
Status: No Feedback Package: Date/time related
PHP Version: 4.1.1 OS: Windows2000
Private report: No CVE-ID: None
View Add Comment Developer Edit
Anyone can comment on a bug. Have a simpler test case? Does it work for you on a different platform? Let us know!
Just going to say 'Me too!'? Don't clutter the database with that please — but make sure to vote on the bug!
Your email address:
Solve the problem:
36 - 4 = ?
Subscribe to this entry?

 [2002-01-11 20:04 UTC] shellum at amirani dot com
I didn't see this bug posted, and I know that it worked fine in all my scripts in 2001.

In 2002, it displays 2011 instead of 2002 for the year

example :    date("Y");   or   date("y")
will return "2011" or "11" instead of "2002" or "02"

I'm using Windows 2000 with service pack 2
PHP 4.1.1 win32 binaries un-modified downloaded direct from on Microsoft's Personal Web Server that came with Windows98 SE. Loading on IE 5.5.

--Cameron Sellum


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2002-01-11 21:22 UTC]
Can't reproduce this on command line:

C:\php\php-4.1.1-Win32>php -q
<? echo date('Y'); ?>
C:\php\php-4.1.1-Win32>php -q
<? echo date('y'); ?>

Please test this on your system too.

I still bet something is configured wrong on your system.
 [2002-02-02 06:35 UTC]
No feedback was provided for this bug, so it is being suspended.
If you are able to provide the information that was requested,
please do so and change the status of the bug back to "Open".
PHP Copyright © 2001-2021 The PHP Group
All rights reserved.
Last updated: Fri Jul 30 08:01:24 2021 UTC