ID:               20805
 Updated by:       [EMAIL PROTECTED]
 Reported By:      [EMAIL PROTECTED]
-Status:           Open
+Status:           Feedback
 Bug Type:         Date/time related
 Operating System: Windows 2000 SP3
 PHP Version:      4.2.2
 New Comment:

Not enough information was provided for us to be able
to handle this bug. Please re-read the instructions at
http://bugs.php.net/how-to-report.php

If you can provide more information, feel free to add it
to this bug and change the status back to "Open".

Thank you for your interest in PHP.





Previous Comments:
------------------------------------------------------------------------

[2002-12-04 01:22:25] [EMAIL PROTECTED]

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 this bug report at http://bugs.php.net/?id=20805&edit=1

Reply via email to