Why does PHP no longer parse dates with "BRST"?


BRST stands for "Brasilia Summer Time"

Prior to version 7.0.26, PHP parsed the following string:

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

After this release, 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 googled the changelog but couldn't find any explanation for it.




This has been answered here: https://stackoverflow.com/questions/48076970/why-php-does-not-parse-brst-dates-anymore

Basically, several timezone definitions were removed in this commit .

PHP has been updated to follow these new definitions in this commit .

Scroll to Top