Carbon/DateTime: 在数据库中找不到时区

Carbon/DateTime: The timezone could not be found in the database

我正在读取带有日期时间字段的 CSV 文件,但是当我尝试通过执行 $date = new Carbon($row['date']) 将日期转换为 Carbon 时,我遇到了以下错误之一:

DateTime::__construct(): Failed to parse time string (09/07/2014 16:55:22 MEST) at position 20 (M): The timezone could not be found in the database

DateTime::__construct(): Failed to parse time string (24/01/2014 16:57:27 MET) at position 0 (2): Unexpected character

似乎 PHP 无法识别 MET/MEST 时区。如何动态转换任何非标准时区以创建 Carbon/DateTime 对象?

格式可能不是可识别的格式。改用这个。它只适用于 MET,因为 MEST 不是 valid timezone

$date = Carbon::createFromFormat('d/m/Y H:i:s T', $row['date']);