ID: 39740
Updated by: [EMAIL PROTECTED]
Reported By: tessone at polyglut dot net
-Status: Open
+Status: Feedback
Bug Type: Date/time related
Operating System: Linux 2.4.21
PHP Version: 4.4.4
New Comment:
Cannot reproduce both with PHP4 and PHP5.
Previous Comments:
------------------------------------------------------------------------
[2006-12-05 04:05:04] tessone at polyglut dot net
Description:
------------
gmdate("D") and date("D") give different answers for the same date,
with gmdate off from the correct day of the week. This seems to be a
common bug across many applications -- google "gmdate off by one" and
you'll see it has popped up in Drupal, Moodle, and other programs. I am
seeing the bug pop up in RS Events plugin for Wordpress. Everywhere the
problem seems to be gmdate().
Reproduce code:
---------------
print gmdate("D F jS",1165717800);
print date("D F jS",1165717800);
Expected result:
----------------
Sun December 10th
Sun December 10th
Actual result:
--------------
Sat December 10th
Sun December 10th
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=39740&edit=1