|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2002-12-04 02:12 UTC] sniper@php.net
[2003-01-02 18:41 UTC] sniper@php.net
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Sun Oct 26 05:00:01 2025 UTC |
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.