ID:               39928
 Updated by:       [EMAIL PROTECTED]
 Reported By:      lafriks at hello dot lv
-Status:           Open
+Status:           Feedback
 Bug Type:         Date/time related
 Operating System: Mandriva Linux 2007
 PHP Version:      5.2.0
 New Comment:

Which time zone setting are you using? See phpinfo() output for the
value of the date.timezone setting.


Previous Comments:
------------------------------------------------------------------------

[2006-12-22 00:47:32] lafriks at hello dot lv

Description:
------------
When using new DateTime class it sets (or just formats) bogus timezone
if year is before 1922. For year 1922 timezone is correct but for 1921
is showing wrong.

Reproduce code:
---------------
<?php
$a = new DateTime();
$a->setDate(1922, 1, 1);
$a->setTime(5, 3, 2);
echo $a->format(DateTime::W3C) . "\n";
$a->setDate(1921, 1, 1);
$a->setTime(5, 3, 2);
echo $a->format(DateTime::W3C) . "\n";
?>


Expected result:
----------------
1922-01-01T05:03:02+02:00
1921-01-01T05:03:02+02:00


Actual result:
--------------
1922-01-01T05:03:02+02:00
1921-01-01T05:03:02+01:39



------------------------------------------------------------------------


-- 
Edit this bug report at http://bugs.php.net/?id=39928&edit=1

Reply via email to