Vendor/phpspreadsheet/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Shared/Date.php
protected static function validateTimeZone($timeZone)
    {
        if (is_object($timeZone) && $timeZone instanceof DateTimeZone) {
            return $timeZone;
        } elseif (is_string($timeZone)) {
            return new DateTimeZone($timeZone);
        }

        throw new \Exception('Invalid timezone');
    }
protected static function validateTimeZone($timeZone)
    {
        if (is_object($timeZone) && $timeZone instanceof DateTimeZone) {
            return $timeZone;
        } elseif (is_string($timeZone)) {
            return new DateTimeZone($timeZone);
        }

        throw new \Exception('Invalid timezone');
    }
Validate a timezone.

@param DateTimeZone|string $timeZone The timezone to validate, either as a timezone string or object

@throws \Exception

@return DateTimeZone The timezone as a timezone object
@return DateTimeZone The timezone as a timezone object