Set the last modified time to the current time

@return bool Success status
11850
public function touch()
	{
		$data = $this->cache->get($this->name);

		if ($data !== false)
		{
			return $this->cache->set($this->name, $data, MEMCACHE_COMPRESSED, (int) $this->options['extras']['timeout']);
		}

		return false;
	}
406782
public function lastModified()
    {
        return $this->lastMod == 0?$this->lastMod = $this->getVariables()->getValue("last_modified"):$this->lastMod;
    }
1034287
public function setLastModified($lastModified)
    {
        if ($lastModified instanceof DateTime) {
            $this->lastModified = $lastModified;
            return;
        } elseif ($lastModified instanceof Model) {
            $this->lastModified = $lastModified->updated_at;
            return;
        }

        $this->lastModified = new DateTime($lastModified);
    }
568879
public function isExpired()
    {
        $curTime = $this->timer['now'];
        $maxTime = $this->timer['last'] + $this->_lifetime;

        return ($maxTime < $curTime);
    }
779446
public function shouldUpdate() {
		$now = microtime(true) * 1000;

		if (empty($this->_timer)) {
			$this->_start = (int)(($this->_timer = $now) / 1000);
			return true;
		}

		if (($now - $this->_timer) > $this->_interval) {
			$this->_timer = $now;
			return true;
		}
		return false;
	}
568033
protected function checkAndStoreTime()
    {
        Timer::start();

        $result = $this->check();

        $result->elapsedTime = Timer::stop();

        return $result;
    }
1294559
public function getLastUpdate()
    {
        $time = filemtime($this->parser->getFile());
        if ($time === false) {
            return new DataBackendException(
                "Could not read modification time from {$this->parser->getFile()}"
            );

        }
        return $time;
    }
1252499
public function elapsedTime() {
        $currentTime = microtime(true);
        if ($this->startTime === null) {
            $this->startTime            = $currentTime;
            $this->finishTime           = $currentTime;
        } else {
            $this->finishTime           = $currentTime;
            $this->elapsedTimeFromStart = $currentTime - $this->startTime;
        }
    }
948463
def last_modified(self):
        ''''''
        lm = self.response.headers.get('last-modified', None)
        return datetime.strptime(lm, '%a, %d %b %Y %H:%M:%S GMT') if lm \
            else None
1242086
public function lastActiveReadable()
    {
        return ($this->lastActive == '0000-00-00 00:00:00' || $this->lastActive == null ? 'Never' : date('F jS, Y \a\t h:ia', strtotime($this->lastActive)));
    }
924972
public function getIsExpired()
    {
        $createdAt = $this->getCreatedAt();
        if ($this->getExpiredAfter() === false || $createdAt === null) {
            return false;
        }
        if ($this->timeType == static::$timeTypeLocal) {
            return $this->getDatetimeOffset($this->offsetDatetime($this->currentDatetime(), -$this->getExpiredAfter()), $createdAt) > 0;
        } elseif ($this->timeType == static::$timeTypeUtc) {
            return $this->getDatetimeOffset($this->offsetDatetime($this->currentUtcDatetime(), -$this->getExpiredAfter()), $createdAt) > 0;
        }
        return false;
    }
241026
public function getLastRefreshTimestamp()
    {
        $unixTime = Cache::get($this->cacheTimestampKey);
        
        $dateTime = new DateTime;
        $dateTime->setTimestamp($unixTime);
        
        return $dateTime;
    }
517936
public function set_offline_modified_time($time) {
        global $DB;

        // Update the timemodifiedoffline field only if web services are being used.
        if (WS_SERVER) {
            $this->attempt->timemodifiedoffline = $time;
            return true;
        }
        return false;
    }
595709
public function tryLastModified( $modifiedTime ) {
		$clientCache = $this->getHeader( 'If-Modified-Since' );
		if ( $clientCache !== false ) {
			# IE sends sizes after the date like "Wed, 20 Aug 2003 06:51:19 GMT; length=5202"
			# which would break strtotime() parsing.
			$clientCache = preg_replace( '/;.*$/', '', $clientCache );
			$clientCacheTime = @strtotime( $clientCache );
			if ( $modifiedTime <= $clientCacheTime ) {
				header( 'Status: 304 Not Modified', true, 304 );
				return true;
			}
		}
		return false;
	}
1192208
public function hasTimestamps()
    {
        $this->column('created_at')->dateTime()->nullable();
        $this->column('updated_at')->dateTime()->nullable();

        return $this;
    }
1199077
protected function checkTime()
    {
        $result = false;

        $lastExecution = $this->getExecutionTime();
        $interval = $this->getInterval();
        $anonymous = \common_session_SessionManager::isAnonymous();

        if ($lastExecution === null && !$anonymous) {
            $result = true;
        } elseif($lastExecution !== null && $interval !== null && !$anonymous) {
            $mustBeExecutedAt = clone($lastExecution);
            $mustBeExecutedAt->add($interval);
            $now = new DateTime('now');
            $result = ($mustBeExecutedAt < $now);
        }

        return $result;
    }
238152
public function expired()
    {
        // Update if empty
        if (empty($this->entries)) {
            return true;
        }

        // Check timestamps
        if ($this->timestampManager) {
            return $this->timestampManager->check($this->getTimestamp());
        }

        return false;
    }