From:             ercanaydemir at hotmail dot com
Operating system: Linux
PHP version:      4.3.4
PHP Bug Type:     Date/time related
Bug description:  date function wrongly convert timestamps

Description:
------------
The following example is relevant.

Two dates but with the same hour. Using the date function with the "G"
option gives different results even if the hours are the same.

Reproduce code:
---------------
<?

$D = mktime(0,0,0,3,29,2004,0);

$DM1 = mktime(0,0,0,3,28,2004,0);

echo "$D<br>$DM1<br>";

$Hour = date("G",$D);

$HourM1 = date("G",$DM1);

echo "$Hour<br>$HourM1";

?>

Expected result:
----------------
0

0



Actual result:
--------------
1

0



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

Reply via email to