From:             tessone at polyglut dot net
Operating system: Linux 2.4.21
PHP version:      4.4.4
PHP Bug Type:     Date/time related
Bug description:  gmdate("D") off by GMT offset

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 bug report at http://bugs.php.net/?id=39740&edit=1
-- 
Try a CVS snapshot (PHP 4.4): 
http://bugs.php.net/fix.php?id=39740&r=trysnapshot44
Try a CVS snapshot (PHP 5.2): 
http://bugs.php.net/fix.php?id=39740&r=trysnapshot52
Try a CVS snapshot (PHP 6.0): 
http://bugs.php.net/fix.php?id=39740&r=trysnapshot60
Fixed in CVS:                 http://bugs.php.net/fix.php?id=39740&r=fixedcvs
Fixed in release:             
http://bugs.php.net/fix.php?id=39740&r=alreadyfixed
Need backtrace:               http://bugs.php.net/fix.php?id=39740&r=needtrace
Need Reproduce Script:        http://bugs.php.net/fix.php?id=39740&r=needscript
Try newer version:            http://bugs.php.net/fix.php?id=39740&r=oldversion
Not developer issue:          http://bugs.php.net/fix.php?id=39740&r=support
Expected behavior:            http://bugs.php.net/fix.php?id=39740&r=notwrong
Not enough info:              
http://bugs.php.net/fix.php?id=39740&r=notenoughinfo
Submitted twice:              
http://bugs.php.net/fix.php?id=39740&r=submittedtwice
register_globals:             http://bugs.php.net/fix.php?id=39740&r=globals
PHP 3 support discontinued:   http://bugs.php.net/fix.php?id=39740&r=php3
Daylight Savings:             http://bugs.php.net/fix.php?id=39740&r=dst
IIS Stability:                http://bugs.php.net/fix.php?id=39740&r=isapi
Install GNU Sed:              http://bugs.php.net/fix.php?id=39740&r=gnused
Floating point limitations:   http://bugs.php.net/fix.php?id=39740&r=float
No Zend Extensions:           http://bugs.php.net/fix.php?id=39740&r=nozend
MySQL Configuration Error:    http://bugs.php.net/fix.php?id=39740&r=mysqlcfg

Reply via email to