File tree 1 file changed +4
-4
lines changed
1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -12,13 +12,13 @@ foreach ($strings as $string) {
12
12
echo "\nCovering string: " , addslashes ($ string ), "\n\n" ;
13
13
14
14
try {
15
- $ d1 = DateTime::createFromFormat ('m/d/Y ' , $ string );
15
+ $ d1 = DateTime::createFromFormat ('! m/d/Y ' , $ string );
16
16
} catch (ValueError $ v ) {
17
17
echo $ v ->getMessage (), "\n" ;
18
18
}
19
19
20
20
try {
21
- $ d2 = DateTimeImmutable::createFromFormat ('m/d/Y ' , $ string );
21
+ $ d2 = DateTimeImmutable::createFromFormat ('! m/d/Y ' , $ string );
22
22
} catch (ValueError $ v ) {
23
23
echo $ v ->getMessage (), "\n" ;
24
24
}
@@ -37,15 +37,15 @@ Covering string: 8/8/2016
37
37
38
38
object(DateTime)#1 (3) {
39
39
["date"]=>
40
- string(26) "2016-08-08 13:52:31 .000000"
40
+ string(26) "2016-08-08 00:00:00 .000000"
41
41
["timezone_type"]=>
42
42
int(3)
43
43
["timezone"]=>
44
44
string(3) "UTC"
45
45
}
46
46
object(DateTimeImmutable)#2 (3) {
47
47
["date"]=>
48
- string(26) "2016-08-08 13:52:31 .000000"
48
+ string(26) "2016-08-08 00:00:00 .000000"
49
49
["timezone_type"]=>
50
50
int(3)
51
51
["timezone"]=>
You can’t perform that action at this time.
0 commit comments