Returns a DateTime object when this alarm is going to trigger.

This ignores repeated alarm, only the first trigger is returned.

@return DateTimeImmutable
556154
public function getEffectiveTriggerTime()
    {
        $trigger = $this->TRIGGER;
        if (!isset($trigger['VALUE']) || 'DURATION' === strtoupper($trigger['VALUE'])) {
            $triggerDuration = VObject\DateTimeParser::parseDuration($this->TRIGGER);
            $related = (isset($trigger['RELATED']) && 'END' == strtoupper($trigger['RELATED'])) ? 'END' : 'START';

            $parentComponent = $this->parent;
            if ('START' === $related) {
                if ('VTODO' === $parentComponent->name) {
                    $propName = 'DUE';
                } else {
                    $propName = 'DTSTART';
                }

                $effectiveTrigger = $parentComponent->$propName->getDateTime();
                $effectiveTrigger = $effectiveTrigger->add($triggerDuration);
            } else {
                if ('VTODO' === $parentComponent->name) {
                    $endProp = 'DUE';
                } elseif ('VEVENT' === $parentComponent->name) {
                    $endProp = 'DTEND';
                } else {
                    throw new InvalidDataException('time-range filters on VALARM components are only supported when they are a child of VTODO or VEVENT');
                }

                if (isset($parentComponent->$endProp)) {
                    $effectiveTrigger = $parentComponent->$endProp->getDateTime();
                    $effectiveTrigger = $effectiveTrigger->add($triggerDuration);
                } elseif (isset($parentComponent->DURATION)) {
                    $effectiveTrigger = $parentComponent->DTSTART->getDateTime();
                    $duration = VObject\DateTimeParser::parseDuration($parentComponent->DURATION);
                    $effectiveTrigger = $effectiveTrigger->add($duration);
                    $effectiveTrigger = $effectiveTrigger->add($triggerDuration);
                } else {
                    $effectiveTrigger = $parentComponent->DTSTART->getDateTime();
                    $effectiveTrigger = $effectiveTrigger->add($triggerDuration);
                }
            }
        } else {
            $effectiveTrigger = $trigger->getDateTime();
        }

        return $effectiveTrigger;
    }
623511
public function getPubDate(): \Lullabot\Mpx\DataService\DateTime\DateTimeFormatInterface
    {
        if (!$this->pubDate) {
            return new NullDateTime();
        }

        return $this->pubDate;
    }
1358953
public function build()
    {
        if(null == $this->scheduleBuilder) {
            $this->scheduleBuilder = SimpleScheduleBuilder::simpleSchedule();
        }

        if (null == $this->startTime) {
            $this->startTime = new \DateTime();
        }

        $trigger = $this->scheduleBuilder->build();

        $trigger->setCalendarName($this->calendarName);
        $trigger->setDescription($this->description);
        $trigger->setStartTime($this->startTime);
        $trigger->setEndTime($this->endTime);

        if(null == $this->key) {
            $this->key = new Key(Key::createUniqueName(null), null);
        }

        $trigger->setKey($this->key);

        if($this->jobKey) {
            $trigger->setJobKey($this->jobKey);
        }

        $trigger->setPriority($this->priority);

        if($this->jobDataMap) {
            $trigger->setJobDataMap($this->jobDataMap);
        }

        return $trigger;
    }
467029
private function getDateTime()
    {
        $timezone = new \DateTimeZone($this->options['timezone']);
        $dateTime = new \DateTime('now');
        $dateTime->setTimezone($timezone);
        return $dateTime;
    }
961480
public function getUtcNowForDb()
    {
        $dt = $this->getUtcNow();
        $result = $this->hlpFormat->dateTimeForDb($dt);
        return $result;
    }
420928
private function getEventStartDate()
    {
        $currentDate = $this->Event()->getController()->CurrentDate();
        if ($currentDate && $currentDate->exists()) {
            $date = $currentDate->obj('StartDate')->Format('Y-m-d');
            $time = $currentDate->obj('StartTime')->Format('H:i:s');
            $dateTime = SS_Datetime::create();
            $dateTime->setValue("$date $time");
            return $dateTime;
        } else {
            return null;
        }
    }
468410
protected static function getDateTime()
    {
        // Lazyload
        if (null === self::$dateTime) {
            /* @var Doozr_Datetime_Service self::$dateTime */
            self::$dateTime = Doozr_Loader_Serviceloader::load('datetime');
        }

        return self::$dateTime;
    }
736388
public function toDateTime()
    {
        $datetime = new \DateTime();
        $datetime->setTimestamp($this->sec);

        $microSeconds = $this->truncateMicroSeconds($this->usec);
        if ($microSeconds > 0) {
            $datetime = \DateTime::createFromFormat('Y-m-d H:i:s.u', $datetime->format('Y-m-d H:i:s') . '.' . str_pad($microSeconds, 6, '0', STR_PAD_LEFT));
        }

        $datetime->setTimezone(new \DateTimeZone("UTC"));

        return $datetime;
    }
1183500
public function getLogDate() : DateTime
     {
        $rtn = $this->data['log_date'];

        if (!empty($rtn)) {
            $rtn = new DateTime($rtn);
        }

        return $rtn;
     }
891166
public function getDateUpdated() : DateTime
     {
        $rtn = $this->data['date_updated'];

        if (!empty($rtn)) {
            $rtn = new DateTime($rtn);
        }

        return $rtn;
     }
721731
protected function getExecutionTime()
    {
        if ($this->executionTime === null) {
            $resource = $this->getActionExecution();

            if ($resource !== null) {
                /** @var \core_kernel_classes_Resource $resource */
                $time = (string) $resource->getOnePropertyValue(new \core_kernel_classes_Property(self::PROPERTY_EXECUTION_TIME));
                if (!empty($time)) {
                    $this->executionTime = new DateTime('@' . $time);
                }
            }
        }
        return $this->executionTime;
    }
171820
public function getAdded(): \Lullabot\Mpx\DataService\DateTime\DateTimeFormatInterface
    {
        if (!$this->added) {
            return new NullDateTime();
        }

        return $this->added;
    }
541411
public function resetOneTimeValues()
    {
        $this->prefix = null;

        $this->suffix = null;

        $this->fakerString = null;

        return $this;
    }
298682
public function dateTime()
	{
		return $this->registry()->isRegistered(self::REGISTRY_DATETIME)
			? $this->lookup(self::REGISTRY_DATETIME)
			: new \DateTime('now')
			;
	}
935093
public function getDate()
    {
        if (false === $this->frontMatter->has('date')) {
            # Defaults to last modified
            return (new DateTime)->setTimestamp($this->file->getMTime());
        }

        $date = $this->frontMatter->getDate();

        if ($date instanceof DateTime) {
            return $date;
        }

        return (new DateTime)->setTimestamp($date);
    }
505916
public function withDateAtStartOfMonth() : self
    {
        $instance = $this->withTimeAtMidnight();
        
        $instance->date->setDate($instance->year(), $instance->month(), 1);
        
        return $instance;
    }
644094
public function getUpdatedAt()
    {
        if (!$this->updatedAt) {
            return null;
        } else {
            return $this->updatedAt
                ->setTimezone(new DateTimeZone(app('config')->timezone));
        }
    }