briannesbitt/Carbon · error · Carbon\Exceptions\InvalidTimeZoneException
Unknown or bad timezone ({})
Error message
Unknown or bad timezone ({}) What it means
Error "Unknown or bad timezone ({})" thrown in briannesbitt/Carbon.
Source
Thrown at src/Carbon/CarbonTimeZone.php:115
$timezone = $object;
if ($timezone instanceof static) {
return $timezone;
}
if ($timezone === null || $timezone === false) {
return null;
}
try {
if (!($timezone instanceof DateTimeZone)) {
$name = static::getDateTimeZoneNameFromMixed($object);
$timezone = new static($name);
}
return $timezone instanceof static ? $timezone : new static($timezone->getName());
} catch (Exception $exception) {
throw new InvalidTimeZoneException(
'Unknown or bad timezone ('.($objectDump ?: $object).')',
previous: $exception,
);
}
}
/**
* Returns abbreviated name of the current timezone according to DST setting.
*
* @param bool $dst
*
* @return string
*/
public function getAbbreviatedName(bool $dst = false): string
{
$name = $this->getName();
$date = new DateTimeImmutable($dst ? 'July 1' : 'January 1', $this);View on GitHub (pinned to b13f05955d)
When it happens
Trigger: Thrown at src/Carbon/CarbonTimeZone.php:115 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of briannesbitt/Carbon@b13f05955d (2026-08-17).
Data as JSON: /api/errors/750daa3a71a1dd7d.
Report an issue: GitHub.