public static function timezone($timezone = null): \DateTimeZone
    {
        if ($timezone instanceof DateTimeZone) {
            return $timezone;
        }

        $timezone = $timezone ?: date_default_timezone_get();

        return new DateTimeZone($timezone);
    }
public static function timezone($timezone = null): \DateTimeZone
    {
        if ($timezone instanceof DateTimeZone) {
            return $timezone;
        }

        $timezone = $timezone ?: date_default_timezone_get();

        return new DateTimeZone($timezone);
    }
public static function timezone ( $ timezone = null ) : \ DateTimeZone { if ( $ timezone instanceof DateTimeZone ) { return $ timezone ; } $ timezone = $ timezone ? : date_default_timezone_get ( ) ; return new DateTimeZone ( $ timezone ) ; }
Return a DateTimeZone object based on the current timezone.

@param mixed $timezone
@return \DateTimeZone
Return a DateTimeZone object based on the current timezone .