From: ddb at bitxtender dot de
Operating system: Win XP
PHP version: 5.2.1
PHP Bug Type: Date/time related
Bug description: DateTime ignores the TimeZone object passed to the constructor

Description:
------------
when you create a new DateTime object the timezone object you pass along
in the constructor is ignored.
setting the timezone using setTimeZone works as expected.
also tested with 5.2-dev and 6.0-dev

Reproduce code:
---------------
$dt = new DateTime('@' . time(), new DateTimeZone('Europe/Berlin'));
echo $dt->format(DATE_RFC822);

Expected result:
----------------
Tue, 07 Mar 07 01:22:55 +0100

Actual result:
--------------
Tue, 07 Mar 07 00:22:55 +0000

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