File tree Expand file tree Collapse file tree 2 files changed +98
-2
lines changed Expand file tree Collapse file tree 2 files changed +98
-2
lines changed Original file line number Diff line number Diff line change @@ -9,7 +9,23 @@ $current = "2014-03-02 16:24:08";
9
9
$ i = DateTimeImmutable::createFromInterface ( date_create ( $ current ) );
10
10
var_dump ( $ i );
11
11
12
- DateTimeImmutable::createFromInterface ( date_create_immutable ( $ current ) );
12
+ $ i = DateTimeImmutable::createFromInterface ( date_create_immutable ( $ current ) );
13
+ var_dump ( $ i );
14
+
15
+ $ current = "2019-12-16 15:06:46 CET " ;
16
+
17
+ $ i = DateTimeImmutable::createFromInterface ( date_create ( $ current ) );
18
+ var_dump ( $ i );
19
+
20
+ $ i = DateTimeImmutable::createFromInterface ( date_create_immutable ( $ current ) );
21
+ var_dump ( $ i );
22
+
23
+ $ current = "2019-12-16 15:08:20 +0100 " ;
24
+
25
+ $ i = DateTimeImmutable::createFromInterface ( date_create ( $ current ) );
26
+ var_dump ( $ i );
27
+
28
+ $ i = DateTimeImmutable::createFromInterface ( date_create_immutable ( $ current ) );
13
29
var_dump ( $ i );
14
30
?>
15
31
--EXPECTF--
@@ -29,3 +45,35 @@ object(DateTimeImmutable)#%d (3) {
29
45
["timezone"]=>
30
46
string(13) "Europe/London"
31
47
}
48
+ object(DateTimeImmutable)#%d (3) {
49
+ ["date"]=>
50
+ string(26) "2019-12-16 15:06:46.000000"
51
+ ["timezone_type"]=>
52
+ int(2)
53
+ ["timezone"]=>
54
+ string(3) "CET"
55
+ }
56
+ object(DateTimeImmutable)#%d (3) {
57
+ ["date"]=>
58
+ string(26) "2019-12-16 15:06:46.000000"
59
+ ["timezone_type"]=>
60
+ int(2)
61
+ ["timezone"]=>
62
+ string(3) "CET"
63
+ }
64
+ object(DateTimeImmutable)#%d (3) {
65
+ ["date"]=>
66
+ string(26) "2019-12-16 15:08:20.000000"
67
+ ["timezone_type"]=>
68
+ int(1)
69
+ ["timezone"]=>
70
+ string(6) "+01:00"
71
+ }
72
+ object(DateTimeImmutable)#%d (3) {
73
+ ["date"]=>
74
+ string(26) "2019-12-16 15:08:20.000000"
75
+ ["timezone_type"]=>
76
+ int(1)
77
+ ["timezone"]=>
78
+ string(6) "+01:00"
79
+ }
Original file line number Diff line number Diff line change @@ -9,7 +9,23 @@ $current = "2014-03-02 16:24:08";
9
9
$ i = DateTime::createFromInterface ( date_create ( $ current ) );
10
10
var_dump ( $ i );
11
11
12
- DateTime::createFromInterface ( date_create_immutable ( $ current ) );
12
+ $ i = DateTime::createFromInterface ( date_create_immutable ( $ current ) );
13
+ var_dump ( $ i );
14
+
15
+ $ current = "2019-12-16 15:06:46 CET " ;
16
+
17
+ $ i = DateTime::createFromInterface ( date_create ( $ current ) );
18
+ var_dump ( $ i );
19
+
20
+ $ i = DateTime::createFromInterface ( date_create_immutable ( $ current ) );
21
+ var_dump ( $ i );
22
+
23
+ $ current = "2019-12-16 15:08:20 +0100 " ;
24
+
25
+ $ i = DateTime::createFromInterface ( date_create ( $ current ) );
26
+ var_dump ( $ i );
27
+
28
+ $ i = DateTime::createFromInterface ( date_create_immutable ( $ current ) );
13
29
var_dump ( $ i );
14
30
?>
15
31
--EXPECTF--
@@ -29,3 +45,35 @@ object(DateTime)#%d (3) {
29
45
["timezone"]=>
30
46
string(13) "Europe/London"
31
47
}
48
+ object(DateTime)#%d (3) {
49
+ ["date"]=>
50
+ string(26) "2019-12-16 15:06:46.000000"
51
+ ["timezone_type"]=>
52
+ int(2)
53
+ ["timezone"]=>
54
+ string(3) "CET"
55
+ }
56
+ object(DateTime)#%d (3) {
57
+ ["date"]=>
58
+ string(26) "2019-12-16 15:06:46.000000"
59
+ ["timezone_type"]=>
60
+ int(2)
61
+ ["timezone"]=>
62
+ string(3) "CET"
63
+ }
64
+ object(DateTime)#%d (3) {
65
+ ["date"]=>
66
+ string(26) "2019-12-16 15:08:20.000000"
67
+ ["timezone_type"]=>
68
+ int(1)
69
+ ["timezone"]=>
70
+ string(6) "+01:00"
71
+ }
72
+ object(DateTime)#%d (3) {
73
+ ["date"]=>
74
+ string(26) "2019-12-16 15:08:20.000000"
75
+ ["timezone_type"]=>
76
+ int(1)
77
+ ["timezone"]=>
78
+ string(6) "+01:00"
79
+ }
You can’t perform that action at this time.
0 commit comments