php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #20805 day of the Month output incorrect
Submitted: 2002-12-04 01:22 UTC Modified: 2003-01-02 18:41 UTC
From: lcadle at statravel dot com dot au Assigned:
Status: No Feedback Package: Date/time related
PHP Version: 4.2.2 OS: Windows 2000 SP3
Private report: No CVE-ID: None
 [2002-12-04 01:22 UTC] lcadle at statravel dot com dot au
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.

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2002-12-04 02:12 UTC] sniper@php.net
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.



 [2003-01-02 18:41 UTC] sniper@php.net
No feedback was provided. The bug is being suspended because
we assume that you are no longer experiencing the problem.
If this is not the case and you are able to provide the
information that was requested earlier, please do so and
change the status of the bug back to "Open". Thank you.


 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Sun Dec 22 05:01:30 2024 UTC