|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2017-01-17 07:03 UTC] heiglandreas@php.net
-PHP Version: trunk-SVN-2012-02-09 (SVN)
+PHP Version: 7.1
[2017-03-19 10:13 UTC] heiglandreas@php.net
-Status: Open
+Status: Duplicate
[2017-03-19 10:13 UTC] heiglandreas@php.net
|
|||||||||||||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Sat Oct 25 23:00:01 2025 UTC |
Description: ------------ When creating a new DateTime object, if given a parseable string with a timezone descriptor such as "Monday, 15-Aug-05 15:52:01 PDT" AND a DateTimeZone argument, the DateTimeZone argument will be completely ignored. Please either reopen #40743 or fix this bug if it is a regression for a different reason. This is broken on 5.3.3 and trunk. Test script: --------------- $a = new DateTime('Monday, 15-Aug-05 15:52:01 PDT', new DateTimeZone('America/New_York')); print_r($a); Expected result: ---------------- An exception. If you absolutely must, which you shouldn't, a warning and an automatic conversion of the date string to the proper time in America/New_York. Actual result: -------------- DateTime Object ( [date] => 2005-08-15 15:52:01 [timezone_type] => 2 [timezone] => PDT )