|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2006-12-05 10:02 UTC] tony2001@php.net
[2006-12-13 01:00 UTC] php-bugs at lists dot php dot net
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Fri Nov 07 21:00:01 2025 UTC |
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