briannesbitt/Carbon · error · Carbon\Exceptions\InvalidTimeZoneException
Unknown timezone for offset {} seconds.
Error message
Unknown timezone for offset {} seconds. What it means
Error "Unknown timezone for offset {} seconds." thrown in briannesbitt/Carbon.
Source
Thrown at src/Carbon/CarbonTimeZone.php:242
}
}
return null;
}
/**
* Returns a new CarbonTimeZone object using the region string instead of offset string.
*/
public function toRegionTimeZone(?DateTimeInterface $date = null): ?self
{
$timezone = $this->toRegionName($date);
if ($timezone !== null) {
return new static($timezone);
}
if (Carbon::isStrictModeEnabled()) {
throw new InvalidTimeZoneException('Unknown timezone for offset '.$this->getOffset($this->resolveCarbon($date)).' seconds.');
}
return null;
}
/**
* Cast to string (get timezone name).
*
* @return string
*/
public function __toString()
{
return $this->getName();
}
/**
* Return the type number:
*View on GitHub (pinned to b13f05955d)
When it happens
Trigger: Thrown at src/Carbon/CarbonTimeZone.php:242 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/706c85ccb3ae4ecd.
Report an issue: GitHub.