Get Unix timestamp from database server.

@return int Unix epoch.
499892
final public function time() {
		if ($this->dbtype == 'pgsql')
			return $this->query(
				"SELECT EXTRACT('epoch' from CURRENT_TIMESTAMP) AS now"
			)['now'];
		if ($this->dbtype == 'mysql')
			return $this->query(
				"SELECT UNIX_TIMESTAMP() AS now")['now'];
		return $this->query(
			"SELECT strftime('%s', CURRENT_TIMESTAMP) AS now"
		)['now'];
	}
1352300
public long getTimestamp()
    {
        while (true)
        {
            long current = System.currentTimeMillis() * 1000;
            long last = lastTimestampMicros.get();
            long tstamp = last >= current ? last + 1 : current;
            if (lastTimestampMicros.compareAndSet(last, tstamp))
                return tstamp;
        }
    }
219276
public function UTCTimeZoneOffset() : int
    {
        $originDateTime = new \DateTime('now', $this);

        $utcTimeZone = new \DateTimeZone('UTC');
        $utcDateTime = new \DateTime('now', $utcTimeZone);

        return $utcTimeZone->getOffset($utcDateTime) - $this->getOffset($originDateTime);
    }
97749
public static function getNonTimestampPks()
	{
		$timestamp_start_name = static::temporal_property('start_column');
		$timestamp_end_name = static::temporal_property('end_column');

		$pks = array();
		foreach(parent::primary_key() as $key)
		{
			if ($key != $timestamp_start_name && $key != $timestamp_end_name)
			{
				$pks[] = $key;
			}
		}

		return $pks;
	}
861758
public function getTimestamp()
    {
        $name = $this->name;
        $this->timestamp = $this->resource->getTimestamp($name, $this->sdopx);
        return $this->timestamp;
    }
341790
public function getTimestampAttribute()
    {
        if (! array_key_exists('timestamp', $this->attributes)) {
            return Carbon::now();
        }

        return Carbon::parse($this->attributes['timestamp']);
    }
310354
public function getTotalTimestampInterval(): float
    {
        $retval = 0;
        foreach ($this->intervals as $interval) {
            $retval += $interval->getTimestampInterval();
        }

        return $retval;
    }
582618
private function getLoggerTime()
    {
        if (! static::$timezone) {
            static::$timezone = new \DateTimeZone(date_default_timezone_get() ? : 'UTC');
        }

        // php7.1+ always has microseconds enabled, so we do not need this hack
        if ($this->microsecondTimestamps && PHP_VERSION_ID < 70100) {
            $ts = \DateTime::createFromFormat('U.u', sprintf('%.6F', microtime(true)), static::$timezone);
        } else {
            $ts = new \DateTime(null, static::$timezone);
        }

        $ts->setTimezone(static::$timezone);
        return $ts;
    }
658173
private function getSessionTimestamp()
    {
        if ($this->_phpsession && isset($_SESSION[$this->_sessionName]->SessionID))
            $timestamp = $_SESSION[$this->_sessionName]->SessionID;


        if ($this->_cookie && isset($_COOKIE[$this->_sessionName . "_Timestamp"]))
            $timestamp = $_COOKIE[$this->_sessionName . "_Timestamp"];

        return $timestamp;
    }
210998
protected String getTimestamp() {
        final Date date = new Date(System.currentTimeMillis());
        final DateFormat formatter = DateFormat.getDateTimeInstance(DateFormat.SHORT, DateFormat.SHORT);
        return formatter.format(date);
    }
862929
public function getDisplayTimestamp()
    {
        $app = Application::getFacadeApplication();
        $dh = $app->make('helper/date'); /* @var $dh \Concrete\Core\Localization\Service\Date */

        return $dh->formatDateTime($this->time, true, true);
    }
545391
public function getTimeStamp()
    {
        if (!isset($this->timestamp)) {
            $this->handler->populateTimestamp($this);
        }
        return $this->timestamp;
    }
312017
def unix_time(self, dt):
        
        epoch = datetime.utcfromtimestamp(0)
        delta = dt - epoch
        return int(delta.total_seconds())
841090
public long getTimestamp() {
		Long res = getEntity(invokeGet("utils/timestamp", null), Long.class);
		return res != null ? res : 0L;
	}
714742
public function getDuration()
    {
        $start = $this->getStarted();

        if (empty($start)) {
            return 0;
        }

        $end = $this->getFinished();

        if (empty($end)) {
            $end = new \DateTime();
        }

        return $end->getTimestamp() - $start->getTimestamp();
    }
980785
public function getTimestamp($format = self::TIMESTAMP_FORMAT_RFC1123) {
		$this->ensureInput();
		if(!isset($this->input['timestamp'])) return null;
		switch($format) {
			case static::TIMESTAMP_FORMAT_UNIX:
				return strtotime($this->input['timestamp']);
			case static::TIMESTAMP_FORMAT_RFC1123:
			default:
				return $this->input['timestamp'];
		}
	}
1211416
private function _generateTimestamp()
    {
        $time = microtime(true);
        $micro = sprintf('%06d', ($time - floor($time)) * 1000000);
        $date = new DateTime(date('Y-m-d H:i:s.' . $micro, $time));
        return $date->format("Y-m-d H:i:s.u");
    }