src/Carbon/Traits/Date.php
public function setTimezone($value)
    {
        /** @var static $date */
        $date = parent::setTimezone(static::safeCreateDateTimeZone($value));
        // https://bugs.php.net/bug.php?id=72338
        // just workaround on this bug
        $date->getTimestamp();

        return $date;
    }
public function setTimezone($value)
    {
        /** @var static $date */
        $date = parent::setTimezone(static::safeCreateDateTimeZone($value));
        // https://bugs.php.net/bug.php?id=72338
        // just workaround on this bug
        $date->getTimestamp();

        return $date;
    }
public function setTimezone ( $ value ) { /** @var static $date */ $ date = parent :: setTimezone ( static :: safeCreateDateTimeZone ( $ value ) ) ; // https://bugs.php.net/bug.php?id=72338 // just workaround on this bug $ date -> getTimestamp ( ) ; return $ date ; }
Set the instance's timezone from a string or object.

@param \DateTimeZone|string $value

@return static|CarbonInterface
Set the instance s timezone from a string or object .