ID:               45285
 Updated by:       [EMAIL PROTECTED]
 Reported By:      davidn at virtuant dot com
-Status:           Open
+Status:           Feedback
 Bug Type:         Date/time related
 Operating System: Win Vista, Win 2003Server
 PHP Version:      5.2.6
 New Comment:

Thank you for this bug report. To properly diagnose the problem, we
need a short but complete example script to be able to reproduce
this bug ourselves. 

A proper reproducing script starts with <?php and ends with ?>,
is max. 10-20 lines long and does not require any external 
resources such as databases, etc. If the script requires a 
database to demonstrate the issue, please make sure it creates 
all necessary tables, stored procedures etc.

Please avoid embedding huge scripts into the report.

Your reproducible code is broken, please provide working code.


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

[2008-06-16 18:39:22] davidn at virtuant dot com

Description:
------------
My php.ini:

[Date]
; Defines the default timezone used by the date functions
date.timezone = "America/New_York"

When using the new DateTime() function: without explicitly setting the
actual timezone in code, no timezone is recognized.

Also, when using date_default_timezone_set(), you can't depend on
date_default_timezone_get() to get the .ini setting. It doesn't work.

Reproduce code:
---------------
date_default_timezone_set(date_default_timezone_get());

$datetime = new DateTime();
$datetime->format('G'), 0, 0);  // top of hour
echo $datetime->format(DATE_RFC3339);



Expected result:
----------------
2008-06-16T18:00:00+01:00 

Actual result:
--------------
2008-06-16T18:00:00+00:00 


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


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

Reply via email to