From: paul at mileham dot net
Operating system: Windows 2000
PHP version: 4.3.4
PHP Bug Type: Date/time related
Bug description: Incorrect date returned by date()
Description:
------------
date() returns Saturday 27th March 2004 instead of Sunday 28th March 2004.
mktime is OK.We have a diary with two consecutive Saturdays - hoorah!
Reproduce code:
---------------
// this proves there's a bug in php dates!!
for($i=1;$i<32;$i++) {
$monnum=3;
$year=2004;
$date2= date('D jS F Y',mktime(0,0,0,$monnum,$i,$year));
$d3=mktime(0,0,0,$monnum,$i,$year);
echo "<br>".$date2;
echo $d3;
}
Expected result:
----------------
Each date correct
Actual result:
--------------
Two Saturdays and no Sunday
--
Edit bug report at http://bugs.php.net/?id=26917&edit=1
--
Try a CVS snapshot (php4): http://bugs.php.net/fix.php?id=26917&r=trysnapshot4
Try a CVS snapshot (php5): http://bugs.php.net/fix.php?id=26917&r=trysnapshot5
Fixed in CVS: http://bugs.php.net/fix.php?id=26917&r=fixedcvs
Fixed in release: http://bugs.php.net/fix.php?id=26917&r=alreadyfixed
Need backtrace: http://bugs.php.net/fix.php?id=26917&r=needtrace
Need Reproduce Script: http://bugs.php.net/fix.php?id=26917&r=needscript
Try newer version: http://bugs.php.net/fix.php?id=26917&r=oldversion
Not developer issue: http://bugs.php.net/fix.php?id=26917&r=support
Expected behavior: http://bugs.php.net/fix.php?id=26917&r=notwrong
Not enough info: http://bugs.php.net/fix.php?id=26917&r=notenoughinfo
Submitted twice: http://bugs.php.net/fix.php?id=26917&r=submittedtwice
register_globals: http://bugs.php.net/fix.php?id=26917&r=globals
PHP 3 support discontinued: http://bugs.php.net/fix.php?id=26917&r=php3
Daylight Savings: http://bugs.php.net/fix.php?id=26917&r=dst
IIS Stability: http://bugs.php.net/fix.php?id=26917&r=isapi
Install GNU Sed: http://bugs.php.net/fix.php?id=26917&r=gnused
Floating point limitations: http://bugs.php.net/fix.php?id=26917&r=float