Updates the last activity time to "now".

@return void
@throws Exception\SessionNotStartedException
438643
public function touch()
    {
        if ($this->started !== true) {
            throw new Exception\SessionNotStartedException('Tried to touch a session, but the session has not been started yet.', 1354284318);
        }

        // Only makes sense for remote sessions because the currently active session
        // will be updated on shutdown anyway:
        if ($this->remote === true) {
            $this->lastActivityTimestamp = $this->now;
            $this->writeSessionMetaDataCacheEntry();
        }
    }
278932
public function setTimestamps()
	{
		$now = date('Y-m-d H:i:s');

		if (isset($this->updated_at))
			$this->updated_at = $now;

		if (isset($this->created_at) && $this->isNewRecord())
			$this->created_at = $now;
	}
635509
private function resume()
	{
		$this->debug->groupCollapsed(__METHOD__);
		if (isset($_SESSION)) {
			$this->user = ArrayUtil::pathGet($_SESSION, $this->cfg['sessionPath']);
		}
		/*
			Session?
		*/
		if (!empty($this->user)) {
			$this->debug->info('resuming from session');
			if (isset($this->user['_ts_cur'])) {
				$this->user['lastactivity'] = $this->user['_ts_cur'];
			}
			$this->userid = $this->user['userid'];
			$this->auth_via = 'session';
			$this->auth = 2;
			if ($this->user['lastactivity'] + $this->cfg['maxIdle'] < time()) {
				$this->debug->warn('idle');
				$this->debug->log('lastactivity', $this->user['lastactivity']);
				$this->auth = 0;
			} else {
				$this->update(array('lastactivity'=>'NOW()'));
			}
		}
		/*
			Persist cookie?
		*/
		if (empty($this->auth) && isset($_COOKIE[ $this->cfg['persistCookie']['name'] ])) {
			$persist_vals = Cookie::get($this->cfg['persistCookie']['name']);
			$userid = isset($persist_vals['username']) && isset($persist_vals['token'])
				? $this->verifyPersistToken($persist_vals['username'], $persist_vals['token'])	// drops from db if found
				: null;
			if ($userid) {
				$this->debug->info('resuming from persist token');
				$this->setCurrent($userid);
				$this->setPersistToken();
				$this->auth_via = 'cookie';
				$this->auth = 1;
			}
		}
		/*
			Social Cookie?
		*/
		if (empty($this->auth)) {
		}
		if (!empty($this->auth)) {
			$this->user['_ts_cur'] = time();
		}
		$this->debug->groupEnd();
	}
658893
public function timestamps(): void {
    $this->optional('created_at', Timestamp::class)->readOnly();
    $this->optional('updated_at', Timestamp::class)->readOnly();
  }
854370
protected function timestampUpdate()
    {
        $this->updated = date('Y-m-d H:i:s');
        $this->id || $this->created = $this->updated;
    }
904476
public function eventAfterUpdate()
    {
        $this->updateNavItemTimesamp();
        if (!empty($this->_olds)) {
            $oldPlaceholderVar = $this->_olds['placeholder_var'];
            $oldPrevId = (int) $this->_olds['prev_id'];
            if ($oldPlaceholderVar != $this->placeholder_var || $oldPrevId != $this->prev_id) {
                $this->reindex($this->nav_item_page_id, $oldPlaceholderVar, $oldPrevId);
            }
            $this->reindex($this->nav_item_page_id, $this->placeholder_var, $this->prev_id);
            Log::add(2, ['tableName' => 'cms_nav_item_page_block_item', 'action' => 'update', 'row' => $this->id, 'pageTitle' => $this->droppedPageTitle, 'blockName' => $this->block->getNameForLog()], 'cms_nav_item_page_block_item', $this->id);
        }
    }
335825
public function abort(){
        if($this->status() !== self::ACTIVE){
            throw Exception\SessionException::notStarted();
        }

        session_abort();
        
        $this->finishedData = $_SESSION;
    }
718492
protected void updateSLA(int seconds) throws ActivityException {
        try {
            ProcessExecutor engine = this.getEngine();
            super.loginfo("Update activity timeout as " + seconds + " seconds");
            InternalEvent delayMsg = InternalEvent.createActivityDelayMessage(this.getActivityInstance(),
                    this.getMasterRequestId());
            String eventName = ScheduledEvent.INTERNAL_EVENT_PREFIX+this.getActivityInstanceId() + "timeout";
            engine.sendDelayedInternalEvent(delayMsg, seconds, eventName, true);
        } catch (Exception e) {
            throw new ActivityException(-1, "Failed to update SLA for activity instance"
                    + this.getActivityInstanceId(), e);
        }
    }
1320889
protected function startSession()
    {
        if (@session_status() === \PHP_SESSION_ACTIVE) {
            throw new SessionNotStartedException('Session started already!');
        }

        if (ini_get('session.use_cookies') && headers_sent($file, $line)) {
            throw new SessionNotStartedException(sprintf('Unable to start session, headers already sent by "%s" at line %d.', $file, $line));
        }

        $this->setSessionConfig();

        /*
         | We will start session, if fails
         | we will throw exception to user
         */
        if (!session_start()) {
            throw new SessionNotStartedException('Unable to start session');
        }
    }
468215
public function initializeTimestamps()
    {
        if (is_null($this->createdAt) && is_null($this->updatedAt)) {
            $this->createdAt = Carbon::now();
            $this->updatedAt = Carbon::now();
        }
    }
364832
public function reset()
    {
        $this->values[self::CURRENTSESSION] = null;
        $this->values[self::PREVIOUSSESSIONS] = [];
    }
610475
private function updateNextCheckTime()
    {
        $hourToCheck = $this->getCheckTime();

        /** @var \OxidEsales\Eshop\Core\UtilsDate $utilsDate */
        $utilsDate = \OxidEsales\Eshop\Core\Registry::getUtilsDate();
        $nextCheckTime = $utilsDate->formTime('tomorrow', $hourToCheck);

        $this->getConfig()->saveSystemConfigParameter('str', 'sOnlineLicenseNextCheckTime', $nextCheckTime);
    }
841526
public static function clearSession() {
    $user = self::$currentUser;
    self::$currentUser = null;
    if (isset(self::$serverTimezone)) {
      date_default_timezone_set(self::$serverTimezone);
    }
    if ($user) {
      $user->updateDataProtection();
    }
  }
157370
protected function updateTimestamps()
    {
        $time = $this->freshTimestamp();

        if (! $this->isDirty($this->updatedAtColumn)) {
            $this->setUpdatedAt($time);
        }

        if (! $this->exists && ! $this->isDirty($this->createdAtColumn)) {
            $this->setCreatedAt($time);
        }
    }
740840
public function updateLastAdminActivity()
    {
        $now = \Yii::$app->formatter->asTimestamp(time());

        if (!$this->lastAdminActivityAgo || $this->lastAdminActivityAgo > 10) {
            $this->last_activity_at = $now;
            $this->last_admin_activity_at = $now;

            $this->save(false);
        }

        return $this;
    }
1112781
public function update()
    {
        $now = new \DateTime();

        foreach ($this->toUpdate as $providerName => $urls) {
            foreach ($urls as $url) {
                $shares = $this->providers[$providerName]['provider']->getShares($url);

                $this->cache->save($this->getId($providerName, $url), array($shares, $now));
            }
        }
    }
417854
protected function updateTimestamps() {
        $time = $this->freshTimestamp();
        if ($this->isEmpty(static::UPDATED_AT)
            && $this->hasColumn(static::UPDATED_AT)) {
            $this->setUpdatedAt($time);
        }

        if ($this->isNewRecord
            && $this->isEmpty(static::CREATED_AT)
            && $this->hasColumn(static::CREATED_AT)) {
            $this->setCreatedAt($time);
        }
    }