src/Carbon/Traits/Date.php
protected function autoDetectTimeZone($object, $originalObject = null)
    {
        /** @var CarbonTimeZone $timezone */
        $timezone = CarbonTimeZone::instance($object);
        if ($timezone && is_int($originalObject ?: $object)) {
            $timezone = $timezone->toRegionTimeZone($this);
        }

        return $timezone;
    }
protected function autoDetectTimeZone($object, $originalObject = null)
    {
        /** @var CarbonTimeZone $timezone */
        $timezone = CarbonTimeZone::instance($object);
        if ($timezone && is_int($originalObject ?: $object)) {
            $timezone = $timezone->toRegionTimeZone($this);
        }

        return $timezone;
    }
protected function autoDetectTimeZone ( $ object , $ originalObject = null ) { /** @var CarbonTimeZone $timezone */ $ timezone = CarbonTimeZone :: instance ( $ object ) ; if ( $ timezone && is_int ( $ originalObject ? : $ object ) ) { $ timezone = $ timezone -> toRegionTimeZone ( $ this ) ; } return $ timezone ; }
Creates a DateTimeZone from a string, DateTimeZone or integer offset then convert it as region timezone
if integer.

@param \DateTimeZone|string|int|null $object
@param \DateTimeZone|string|int|null $originalObject if different

@throws \InvalidArgumentException

@return CarbonTimeZone|false
Creates a DateTimeZone from a string DateTimeZone or integer offset then convert it as region timezone if integer .