public function getUTCObject($time, string $timezone = null)
	{
		if ($time instanceof Time)
		{
			$time = $time->toDateTime()
					->setTimezone(new DateTimeZone('UTC'));
		}
		else if ($time instanceof DateTime)
		{
			$time = $time->setTimezone(new DateTimeZone('UTC'));
		}
		else if (is_string($time))
		{
			$timezone = $timezone ?: $this->timezone;
			$timezone = $timezone instanceof DateTimeZone ? $timezone : new DateTimeZone($timezone);
			$time     = new DateTime($time, $timezone);
			$time     = $time->setTimezone(new DateTimeZone('UTC'));
		}

		return $time;
	}
public function getUTCObject($time, string $timezone = null)
	{
		if ($time instanceof Time)
		{
			$time = $time->toDateTime()
					->setTimezone(new DateTimeZone('UTC'));
		}
		else if ($time instanceof DateTime)
		{
			$time = $time->setTimezone(new DateTimeZone('UTC'));
		}
		else if (is_string($time))
		{
			$timezone = $timezone ?: $this->timezone;
			$timezone = $timezone instanceof DateTimeZone ? $timezone : new DateTimeZone($timezone);
			$time     = new DateTime($time, $timezone);
			$time     = $time->setTimezone(new DateTimeZone('UTC'));
		}

		return $time;
	}
public function getUTCObject ( $ time , string $ timezone = null ) { if ( $ time instanceof Time ) { $ time = $ time -> toDateTime ( ) -> setTimezone ( new DateTimeZone ( 'UTC' ) ) ; } else if ( $ time instanceof DateTime ) { $ time = $ time -> setTimezone ( new DateTimeZone ( 'UTC' ) ) ; } else if ( is_string ( $ time ) ) { $ timezone = $ timezone ? : $ this -> timezone ; $ timezone = $ timezone instanceof DateTimeZone ? $ timezone : new DateTimeZone ( $ timezone ) ; $ time = new DateTime ( $ time , $ timezone ) ; $ time = $ time -> setTimezone ( new DateTimeZone ( 'UTC' ) ) ; } return $ time ; }
Returns a Time instance with the timezone converted to UTC.

@param $time
@param string|null $timezone

@return \DateTime|static
@throws \Exception
Returns a Time instance with the timezone converted to UTC .