We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 3f47368 commit 15d8c80Copy full SHA for 15d8c80
ext/date/tests/bug67118_2.phpt
@@ -0,0 +1,35 @@
1
+--TEST--
2
+Regression introduce in fix for Bug #67118
3
+--INI--
4
+date.timezone=Europe/Paris
5
+--FILE--
6
+<?php
7
+class Foo extends DateTime {
8
+ public function __construct($time = null) {
9
+ $tz = new DateTimeZone('UTC');
10
+ try {
11
+ echo "First try\n";
12
+ parent::__construct($time, $tz);
13
+ return;
14
+ } catch (Exception $e) {
15
+ echo "Second try\n";
16
+ parent::__construct($time.'C', $tz);
17
+ }
18
19
+}
20
+$date = '12 Sep 2007 15:49:12 UT';
21
+var_dump(new Foo($date));
22
+?>
23
+Done
24
+--EXPECTF--
25
+First try
26
+Second try
27
+object(Foo)#1 (3) {
28
+ ["date"]=>
29
+ string(26) "2007-09-12 15:49:12.000000"
30
+ ["timezone_type"]=>
31
+ int(3)
32
+ ["timezone"]=>
33
+ string(3) "UTC"
34
35
0 commit comments