From:             benjamin dot rich at gmail dot com
Operating system: Linux
PHP version:      4.3.10
PHP Bug Type:     Date/time related
Bug description:  date(B) returns wrong net time for static timestamp

Description:
------------
date("B", $timestamp) will return the swatch net time for $timestamp + the
difference between local server time and BMT (net time meridian, swiss
time, GMT+1).

Reproduce code:
---------------
date("B", date());
date("B", gmdate());

Both the above return the same, correct result - they will give the
current net time. However:

$timestamp = mktime(some,GMT,date,and,time);
date("B", $timestamp);

will return the correct net time for this date/time PLUS the difference
between local server time (say, GMT-4) and BMT (GMT+1) - putting it off
(by, in this case, 5 hours).

Expected result:
----------------
date("B", $timestamp);  should return the net time for this timestamp,
assuming the timestamp represents a date and time in at some arbitrary
location like GMT+0.

Actual result:
--------------
Instead, it adds an incorrect factor to the resulting net time

-- 
Edit bug report at http://bugs.php.net/?id=33082&edit=1
-- 
Try a CVS snapshot (php4):   http://bugs.php.net/fix.php?id=33082&r=trysnapshot4
Try a CVS snapshot (php5.0): 
http://bugs.php.net/fix.php?id=33082&r=trysnapshot50
Try a CVS snapshot (php5.1): 
http://bugs.php.net/fix.php?id=33082&r=trysnapshot51
Fixed in CVS:                http://bugs.php.net/fix.php?id=33082&r=fixedcvs
Fixed in release:            http://bugs.php.net/fix.php?id=33082&r=alreadyfixed
Need backtrace:              http://bugs.php.net/fix.php?id=33082&r=needtrace
Need Reproduce Script:       http://bugs.php.net/fix.php?id=33082&r=needscript
Try newer version:           http://bugs.php.net/fix.php?id=33082&r=oldversion
Not developer issue:         http://bugs.php.net/fix.php?id=33082&r=support
Expected behavior:           http://bugs.php.net/fix.php?id=33082&r=notwrong
Not enough info:             
http://bugs.php.net/fix.php?id=33082&r=notenoughinfo
Submitted twice:             
http://bugs.php.net/fix.php?id=33082&r=submittedtwice
register_globals:            http://bugs.php.net/fix.php?id=33082&r=globals
PHP 3 support discontinued:  http://bugs.php.net/fix.php?id=33082&r=php3
Daylight Savings:            http://bugs.php.net/fix.php?id=33082&r=dst
IIS Stability:               http://bugs.php.net/fix.php?id=33082&r=isapi
Install GNU Sed:             http://bugs.php.net/fix.php?id=33082&r=gnused
Floating point limitations:  http://bugs.php.net/fix.php?id=33082&r=float
No Zend Extensions:          http://bugs.php.net/fix.php?id=33082&r=nozend
MySQL Configuration Error:   http://bugs.php.net/fix.php?id=33082&r=mysqlcfg

Reply via email to