Skip to main content
2 de 4
The version 7.0.26 is the first one to evidence the problem.

Why PHP does not parse "BRST" dates anymore?

BRST refers to "Brasília Summer Time"

Before version 7.0.26, PHP could parse this string without any problem:

$date = DateTime("Mon Jan 01 20:00:00 BRST 2017");

After that version, PHP returns:

Fatal error: Uncaught Exception: DateTime::__construct(): Failed to 
parse time string (Mon Jan 01 20:00:00 BRST 2017) at position 4 (J): 
The timezone could not be found in the database in /in/c6K56:5
Stack trace:
#0 /in/c6K56(5): DateTime->__construct('Mon Jan 01 20:0...')
#1 {main}
  thrown in /in/c6K56 on line 5

Process exited with code 255.

I searched in changelogs, but I couldn't find any explanation for that.

Here is the example:

https://3v4l.org/c6K56#v7026