Returns the date and time that this object was created.

@return \Lullabot\Mpx\DataService\DateTime\DateTimeFormatInterface
171820
public function getAdded(): \Lullabot\Mpx\DataService\DateTime\DateTimeFormatInterface
    {
        if (!$this->added) {
            return new NullDateTime();
        }

        return $this->added;
    }
939118
public function getValue()
    {
        if ($this->value instanceof \DateTime) {
            $this->value->setTimezone(new \DateTimeZone('UTC'));

            return $this->value->format('Y-m-d\TH:i:s\Z');
        }

        return $this->value;
    }
535740
public function getTargetExpirationDate(): \Lullabot\Mpx\DataService\DateTime\DateTimeFormatInterface
    {
        if (!$this->targetExpirationDate) {
            return new NullDateTime();
        }

        return $this->targetExpirationDate;
    }
386072
public static function getTime()
    {
        $response = self::connection()->get(self::$api_path . '/time');

        if ($response == false || is_string($response)) {
            return $response;
        }

        return new \DateTime("@{$response->time}");
    }
533505
public function getCreated()
    {
        $date = !is_null($this->created) ? date('d-m-Y H:i', $this->created) : null;

        return new \Datetime($date);
    }
1296314
public function getCreatedAt()
    {
        if (!$this->createdAt) {
            return null;
        } else {
            return $this->createdAt
                ->setTimezone(new DateTimeZone(app('config')->timezone));
        }
    }
241026
public function getLastRefreshTimestamp()
    {
        $unixTime = Cache::get($this->cacheTimestampKey);
        
        $dateTime = new DateTime;
        $dateTime->setTimestamp($unixTime);
        
        return $dateTime;
    }
590729
public function getTimestamp()
	{
		if (!isset($this->timestamp))
		{
			$this->timestamp = $this->hasAdapterOrFail()->adapter->getTimestamp($this->getPath());
		}

		return $this->timestamp;
	}
1151739
public function user_date()
    {
        // get user's timezone
        try {
            $tz   = new DateTimeZone($this->config->get('timezone'));
            $date = new DateTime('now', $tz);
        }
        catch (Exception $e) {
            $date = new DateTime();
        }

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

        return $this->pubDate;
    }
461707
protected function now(): string
    {
        $format = $this->getSchemaManager()->getDatabasePlatform()->getDateTimeFormatString();
        $now    = (new DateTimeImmutable())->format($format);

        return $now;
    }
1130697
public function getTimestamp()
    {
        $timestamp = $this->runLast('date +"%Y%m%d%H%M%S"');
        $timestamp = trim($timestamp);
        $timestamp = preg_match('/^[0-9]{14}$/', $timestamp) ? $timestamp : date('YmdHis');

        return $timestamp;
    }
751366
public function initDatetime()
    {
        if ($this->timeFormat === static::$timeFormatDatetime) {
            return static::$initDatetime;
        }
        if ($this->timeFormat === static::$timeFormatTimestamp) {
            return static::$initTimestamp;
        }
        return null;
    }
613241
public function getExpirationDate(): \Lullabot\Mpx\DataService\DateTime\DateTimeFormatInterface
    {
        if (!$this->expirationDate) {
            return new NullDateTime();
        }

        return $this->expirationDate;
    }
1266585
public function getLockoutDate()
    {
        if ($timestamp = $this->getLockoutTimestamp()) {
            return (new DateTime())->setTimestamp($timestamp)->format($this->dateFormat);
        }
    }
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);
    }
169693
public function getTimeFormat()
    {
        if ($this->getHTML5()) {
            // Browsers expect ISO 8601 times, localisation is handled on the client
            $this->setTimeFormat(DBTime::ISO_TIME);
        }

        if ($this->timeFormat) {
            return $this->timeFormat;
        }

        // Get from locale
        return $this->getFrontendFormatter()->getPattern();
    }