|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #39740 gmdate("D") off by GMT offset
Submitted: 2006-12-05 04:05 UTC Modified: 2006-12-13 01:00 UTC
From: tessone at polyglut dot net Assigned:
Status: No Feedback Package: Date/time related
PHP Version: 4.4.4 OS: Linux 2.4.21
Private report: No CVE-ID: None
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
Block user comment
Status: Assign to:
Bug Type:
From: tessone at polyglut dot net
New email:
PHP Version: OS:


 [2006-12-05 04:05 UTC] tessone at polyglut dot net
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


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2006-12-05 10:02 UTC]
Cannot reproduce both with PHP4 and PHP5.
 [2006-12-13 01:00 UTC] php-bugs at lists dot php dot net
No feedback was provided for this bug for over a week, so it is
being suspended automatically. If you are able to provide the
information that was originally requested, please do so and change
the status of the bug back to "Open".
PHP Copyright © 2001-2021 The PHP Group
All rights reserved.
Last updated: Mon Aug 02 18:01:24 2021 UTC