public static function safeCreateDateTimeZone($timezone)
    {
        if ($timezone === null) {
            // Don't return null...
            return new DateTimeZone(date_default_timezone_get());
        }

        if ($timezone instanceof DateTimeZone) {
            return $timezone;
        }

        /** @noinspection PhpUsageOfSilenceOperatorInspection */
        $tz = @timezone_open((string) $timezone);

        if ($tz === false) {
            throw new Exception\InvalidArgumentException(
                sprintf(
                    'Unknown or bad timezone (%s)', is_scalar($timezone) ? $timezone : gettype($timezone)
                )
            );
        }

        return $tz;
    }