From: [EMAIL PROTECTED] Operating system: Windows 2000 SP3 PHP version: 4.2.2 PHP Bug Type: Date/time related Bug description: day of the Month output incorrect
A stored value from time() in a mysql varchar field, put into a date time array with getdate() the date time array outputs an incorrect day of the month (less by one day in my tests). Environment Apache 1.3 mysql 3.23.51-max-nt country Australia, Melbourne Time example scripts echo time(); cut and pasted output into mysql field of type varchar (14). (why? because I am still building data input section, verified that time was actually correct in database using strftime() ) used this line to retrive date :- $date_time_array = getdate ($myrow["NEWS_DATE"]); used this function to output data :- $date_time_array[ "wday"] this produced the incorrect date, date was incorrect by one day (less), when replaced with this function :- strftime ("%d" ,$myrow["NEWS_DATE"]) the correct time was output. Sorry if my explanation was not satisfactory or I am entirely wrong. I didnt want to waste your time but I didnt see anything in the bug section about it. -- Edit bug report at http://bugs.php.net/?id=20805&edit=1 -- Try a CVS snapshot: http://bugs.php.net/fix.php?id=20805&r=trysnapshot Fixed in CVS: http://bugs.php.net/fix.php?id=20805&r=fixedcvs Fixed in release: http://bugs.php.net/fix.php?id=20805&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=20805&r=needtrace Try newer version: http://bugs.php.net/fix.php?id=20805&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=20805&r=support Expected behavior: http://bugs.php.net/fix.php?id=20805&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=20805&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=20805&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=20805&r=globals PHP 3 support discontinued: http://bugs.php.net/fix.php?id=20805&r=php3 Daylight Savings: http://bugs.php.net/fix.php?id=20805&r=dst IIS Stability: http://bugs.php.net/fix.php?id=20805&r=isapi