system/I18n/Time.php
public function equals($testTime, string $timezone = null): bool
	{
		$testTime = $this->getUTCObject($testTime, $timezone);

		$ourTime = $this->toDateTime()
				->setTimezone(new DateTimeZone('UTC'))
				->format('Y-m-d H:i:s');

		return $testTime->format('Y-m-d H:i:s') === $ourTime;
	}
public function equals($testTime, string $timezone = null): bool
	{
		$testTime = $this->getUTCObject($testTime, $timezone);

		$ourTime = $this->toDateTime()
				->setTimezone(new DateTimeZone('UTC'))
				->format('Y-m-d H:i:s');

		return $testTime->format('Y-m-d H:i:s') === $ourTime;
	}
Determines if the datetime passed in is equal to the current instance.
Equal in this case means that they represent the same moment in time,
and are not required to be in the same timezone, as both times are
converted to UTC and compared that way.

@param Time|DateTime|string $testTime
@param string|null          $timezone

@return boolean
@throws \Exception