Set the start time of the alarm.

@param TimeInterface $time The time to set the alarm for

@return $this
422038
public function setTime(TimeInterface $time): AlarmInterface
    {
        $this->attributes["StartTime"] = $time->asString();

        return $this->save();
    }
761468
public static function fromDateTime(\DateTimeInterface $dateTime) : LocalTime
    {
        return new LocalTime(
            (int) $dateTime->format('G'),
            (int) $dateTime->format('i'),
            (int) $dateTime->format('s'),
            1000 * (int) $dateTime->format('u')
        );
    }
1361508
public function cancelTimer(TimerInterface $timer)
    {
        $this->emit('cancelTimer', [$timer]);

        return $this->loop->cancelTimer($timer);
    }
1198680
public function captureStart(EventInterface $event)
    {
        ++$this->index;

        $time = microtime(true);

        $eventName = $event->getName();
        if ($eventName) {
            $this->timers[$eventName] = ['start' => $time, 'stop' => $time];

            return;
        }
        $this->timers[$this->index] = ['start' => $time, 'stop' => $time];
    }
498855
private function scheduleTimer(TimerInterface $timer)
    {
        $flags = Event::TIMEOUT;

        if ($timer->isPeriodic()) {
            $flags |= Event::PERSIST;
        }

        $event = new Event($this->eventBase, -1, $flags, $this->timerCallback, $timer);
        $this->timerEvents[$timer] = $event;

        $event->add($timer->getInterval());
    }
1136936
public function setTime($time): Timezone
    {
        if (is_string($time)) {
            $time = strtotime($time);
        }

        $this->time = $time - $this->offset;
        return $this;
    }
1269376
public function schedule($time = null)
    {
        if (is_null($time)) {
            $time = time();
        }
        $this->setStatus(Aoe_Scheduler_Model_Schedule::STATUS_PENDING)
            ->setCreatedAt(strftime('%Y-%m-%d %H:%M:%S', time()))
            ->setScheduledAt(strftime('%Y-%m-%d %H:%M:00', $time))
            ->save();
        return $this;
    }
732420
public static function createFromDateTime(DateTimeInterface $dateTime)
    {
        return static::create((int)$dateTime->format('m'), (int)$dateTime->format('d'));
    }
49837
public function setTimeZone($timezone)
	{
		$this->timezone = ($timezone instanceof \DateTimeZone)
			? $timezone
			: new \DateTimeZone($timezone);

		return $this;
	}
1329001
public function setCreationTime(\DateTime $time = null)
	{
		if (is_null($time)) {
			$time = new \DateTime('now');
		}
		$this->creationTime = $time;
	}
305291
public function setDateTime(DateTimeInterface $dt)
    {
        $tz = $dt->getTimeZone();
        $isUtc = in_array($tz->getName(), ['UTC', 'GMT', 'Z']);

        if ($isUtc) {
            $value = $dt->format('Ymd\\THis\\Z');
        } else {
            // Calculating the offset.
            $value = $dt->format('Ymd\\THisO');
        }

        $this->value = $value;
    }
350519
public function setDateTime(DateTimeInterface $dateTime)
    {
        $this->clearCachedValueIf($this->getCachedValue() != $dateTime->format(DateTime::RFC2822));
        if ($dateTime instanceof DateTime) {
            $immutable = new DateTimeImmutable('@'.$dateTime->getTimestamp());
            $dateTime = $immutable->setTimezone($dateTime->getTimezone());
        }
        $this->dateTime = $dateTime;
    }
225046
public function nextClose(Time $time)
    {
        return $this->openingHoursFilter([
            function ($timeRange) use ($time) {
                return $this->findNextCloseInWorkingHours($time, $timeRange);
            },
            function ($timeRange) use ($time) {
                return $this->findNextCloseInFreeTime($time, $timeRange);
            },
        ]);
    }
607766
public function attach(Time $time)
    {
        $time->setFormat($this->format);

        $this->add($time);

        return $this;
    }
1321171
public function setDateTime($dateTime)
	{
		$this->registry()->register(self::REGISTRY_DATETIME, $dateTime, true);
		return $this;
	}
414104
public function setTimeStep($timeStep)
    {
        $timeStep = abs(intval($timeStep));
        $this->timeStep = $timeStep;

        return $this;
    }
1097981
public function setStartTime(string $value) : Migration
    {

        if ($this->data['start_time'] !== $value) {
            $this->data['start_time'] = $value;
            $this->setModified('start_time');
        }

        return $this;
    }