|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2004-01-15 06:33 UTC] derick@php.net
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Mon Oct 20 21:00:02 2025 UTC |
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