Closed
Description
Description
Discovered this issue while importing a data-set from a third party.
The following code:
<?php
var_dump(DateTime::createFromFormat('Y-m-d\TH:i:sP[e]', '2022-02-18T00:00:00+01:00[Europe/Berlin]'));
Resulted in this output:
bool(false)
But I expected this output instead:
object(DateTime)#1 (3) {
["date"]=>
string(26) "2022-02-18 00:00:00.000000"
["timezone_type"]=>
int(1)
["timezone"]=>
string(6) "+01:00"
}
PHP Version
8.1.9 (discovered with 7.2.24)
Operating System
No response