From: jeremyrimer at yahoo dot com Operating system: win2kadvsrv PHP version: 4.3.1 PHP Bug Type: Date/time related Bug description: Date Function returning incorrect NAME of month
So I have some code that prints out this and next month's calendar and populates the cells with the day's events. Sometimes, and I can't find root cause except to say that there MUST be a bug in the date() function or the mktime() function because I have a line of code to produce NEXTmonth's month name in text, and it is producing the month TWO months later instead of 1, despite my +1 increment... $tyear = date("Y"); // the year - 4 digit $nyear = date("Y")+1; $tmonth = date("n"); // the month - no leading 0's $nmonth = date("n")+1; $tday = date("j"); // the day as a number date("F",mktime(0,0,0,$nmonth,$tday,$tyear)); This line can produce not the NEXT month, but TWO months later... Driving me crazy... -Jeremy -- Edit bug report at http://bugs.php.net/?id=22984&edit=1 -- Try a CVS snapshot: http://bugs.php.net/fix.php?id=22984&r=trysnapshot Fixed in CVS: http://bugs.php.net/fix.php?id=22984&r=fixedcvs Fixed in release: http://bugs.php.net/fix.php?id=22984&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=22984&r=needtrace Try newer version: http://bugs.php.net/fix.php?id=22984&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=22984&r=support Expected behavior: http://bugs.php.net/fix.php?id=22984&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=22984&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=22984&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=22984&r=globals PHP 3 support discontinued: http://bugs.php.net/fix.php?id=22984&r=php3 Daylight Savings: http://bugs.php.net/fix.php?id=22984&r=dst IIS Stability: http://bugs.php.net/fix.php?id=22984&r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=22984&r=gnused