Ask a Question related to PHP Bugs, Design and Development.
-
derick@php.net #1
#40743 [Opn->Asn]: DateTime ignores the TimeZone object passed to the constructor
ID: 40743
Updated by: [email]derick@php.net[/email]
Reported By: ddb at bitxtender dot de
-Status: Open
+Status: Assigned
Bug Type: Date/time related
Operating System: Win XP
PHP Version: 5.2.1
-Assigned To:
+Assigned To: derick
Previous Comments:
------------------------------------------------------------------------
[2007-03-06 23:27:24] ddb at bitxtender dot de
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 this bug report at [url]http://bugs.php.net/?id=40743&edit=1[/url]
derick@php.net Guest
-
#40743 [NEW]: DateTime ignores the TimeZone object passed to the constructor
From: ddb at bitxtender dot de Operating system: Win XP PHP version: 5.2.1 PHP Bug Type: Date/time related Bug description: ... -
ANNOUNCE: DateTime::TimeZone 0.44
0.44 2006-04-17 - This release is based on version 2006d of the Olson database. /*===================================================... -
ANNOUNCE: DateTime::TimeZone 0.43
0.43 2006-04-13 - This release is based on version 2006c of the Olson database. - Added a link for AKST9AKDT (to America/Anchorage). ... -
DateTime - default Timezone ?
Hi I can't seem to find a way to set a default timezone for all new DateTime objects. There's a class method for setting the default locale, but... -
DateTime parameter is adjusted according to timezone
Hi, I encountered a following problem : I have a web service, and one of its methods gets parameter of DateTime type. My server is found in...



Reply With Quote

