为什么PHP不再解析"BRST"日期?

hug*_*pos 5 php datetime

BRST指"巴西利亚夏令时"

在7.0.26版之前,PHP可以解析此字符串而不会出现任何问题:

$date = DateTime("Mon Jan 01 20:00:00 BRST 2017");
Run Code Online (Sandbox Code Playgroud)

在该版本之后,PHP返回:

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.
Run Code Online (Sandbox Code Playgroud)

我搜索了更改日志,但我找不到任何解释.

这是一个例子:

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

tim*_*ton 5

你可以看到在这次提交timezonemap.h文件进行了更新,删除对引用brst与许多其他的缩写一起.

提交消息如下:

更新timezonemap.h,需要匹配捆绑的TZ db


深入挖掘(感谢@JamesThorpe)你可以看到1999年7月由Paul Eggert 引入的缩写.值得注意的是,他声称自己发明了这些:

我发明了英语缩写,我还发明了其他行与-3:00行一致.

2016年12月的这个tz提交(再次由Eggert)删除缩写并用以下文本替换它们:

这些表使用数字缩写,如-03和-0330,表示整数小时和分钟UTC偏移.虽然早期版本使用字母时区缩写,但这些缩写是发明的,并不反映常见的做法.