Update the timestamp when data is collected

@param int id
161347
public function setUpdated($id = false)
    {
        $em = $this->getEntityManager();
        $config = $id ? $this->find($id) : $this->findFirst();
        $config->setLastUpdate(new \DateTime());
        $em->persist($config);
        $em->flush();
    }
614606
@Override
	public synchronized void updateHistoryIds(int alertId, 
            int historyId, int sourceHistoryId) throws DatabaseException {
        
    	SqlPreparedStatementWrapper psUpdateHistoryIds = null;
        try {
        	psUpdateHistoryIds = DbSQL.getSingleton().getPreparedStatement("alert.ps.updatehistoryid");
			psUpdateHistoryIds.getPs().setInt(1, historyId);
			psUpdateHistoryIds.getPs().setInt(2, sourceHistoryId);
			psUpdateHistoryIds.getPs().setInt(3, alertId);
			psUpdateHistoryIds.getPs().executeUpdate();
		} catch (SQLException e) {
			throw new DatabaseException(e);
		} finally {
			DbSQL.getSingleton().releasePreparedStatement(psUpdateHistoryIds);
		}
    }
502156
public function setId($id = null)
    {
        if ($id !== null) {
            $id = preg_replace("/[^a-z0-9_\\\d]/i", '_', $id);

            $this->id = (string) $id;
        }
    }
1132585
protected function __apiUpdate (string $id)
    {
        $record = HCGroups::findOrFail ($id);

        $data = $this->getInputData ();

        $record->update (array_get ($data, 'record', []));
        $record->users()->sync(array_get($data, 'users'));

        return $this->apiShow ($record->id);
    }
1027352
protected function updateTimestamps()
    {
        $time = $this->freshTimestamp();

        if (! is_null(static::UPDATED_AT) && ! $this->hasChanged(static::UPDATED_AT)) {
            $this->setUpdatedAt($time);
        }

        if (! $this->exists && ! is_null(static::CREATED_AT) &&
            ! $this->hasChanged(static::CREATED_AT)) {
            $this->setCreatedAt($time);
        }
    }
418522
function Timestamp(message, code_id) {
    Error.call(this);
    this.message = message || "timestamp out of date";
    this.code_id = code_id || null;
    this.statusCode = 409;
}
720722
static function setIsValid( $id, $isValid )
    {
        $dateTime = time();
        $isValid = (int) $isValid;
        eZPersistentObject::updateObjectList( array( 'definition' => eZURL::definition(),
                                                     'update_fields' => array( 'is_valid' => $isValid,
                                                                               'modified' => $dateTime ),
                                                     'conditions' => array( 'id' => $id ) ) );
    }
658893
public function timestamps(): void {
    $this->optional('created_at', Timestamp::class)->readOnly();
    $this->optional('updated_at', Timestamp::class)->readOnly();
  }
434877
public function send($data, $id = null)
    {
        if (!isset($id)) {
            $id = $this->lastId++;
        }
        $this->putLine('id: ' . $id);
        $this->putLine('data: ' . $data);
        $this->putLine();
        $this->flush();
    }
923803
public function write($id, $data)
    {
        if (!$data) 
            $this->getDbConnection()->executeQuery('DELETE FROM session_data WHERE id=?',[$id]);
            else $this->getDbConnection()->executeQuery('REPLACE INTO session_data SET timestamp=?, id=?, value=?',[time(),$id,$data]);
		return true;
    }
612955
public function touch($id, $extraLifetime)
    {
        $sql = "SELECT expire FROM cache WHERE id='$id' AND (expire=0 OR expire>" . time() . ')';
        $res = $this->_query($sql);
        if (!$res) {
            return false;
        }
        $expire = @sqlite_fetch_single($res);
        $newExpire = $expire + $extraLifetime;
        $res = $this->_query("UPDATE cache SET lastModified=" . time() . ", expire=$newExpire WHERE id='$id'");
        if ($res) {
            return true;
        } else {
            return false;
        }
    }
1228550
public function ___expire($id)
    {
        $metadatas = $this->_getMetadatas($id);
        if ($metadatas) {
            $metadatas['expire'] = 1;
            $this->_setMetadatas($id, $metadatas);
        }
    }
319255
function(id) {
		var date,
			target = $(id),
			inst = this._getInst(target[0]);

		if (this._get(inst, "gotoCurrent") && inst.currentDay) {
			inst.selectedDay = inst.currentDay;
			inst.drawMonth = inst.selectedMonth = inst.currentMonth;
			inst.drawYear = inst.selectedYear = inst.currentYear;
		} else {
			date = new Date();
			inst.selectedDay = date.getDate();
			inst.drawMonth = inst.selectedMonth = date.getMonth();
			inst.drawYear = inst.selectedYear = date.getFullYear();
		}
		this._notifyChange(inst);
		this._adjustDate(target);
	}
807767
public function view(? string $id = null): void
    {
        $calendar = null;

        $calendar = $this->Calendars->get($id);

        $this->set('calendar', $calendar);
        $this->set('_serialize', 'calendar');
    }
765941
public function update($id, $data)
    {
        $data = $this->retrieveData($data);
        $updateData = [
            'methods'=> implode(',', $data['methods']),
        ];

        $this->table->update($updateData, ['id' => $id]);

        return $data;
    }
22843
function(id, loaded, total) {
            updateTotalProgress(id, loaded, total);
            perFileProgress[id] = {loaded: loaded, total: total};
        }
654327
public function update($id)
    {
        try {
            $entry = $this->collection->findOne($id);
        } catch (Exception $e) {
            // noop
        }

        if (is_null($entry)) {
            return $this->app->notFound();
        }

        if ($this->request->isPost() || $this->request->isPut()) {
            try {
                $merged = array_merge(
                    isset($entry) ? $entry->dump() : array(),
                    $this->request->getBody() ?: array()
                );

                $entry->set($merged)->save();

                h('notification.info', $this->clazz.' updated');

                h('controller.update.success', array(
                    'model' => $entry,
                ));
            } catch (Stop $e) {
                throw $e;
            } catch (Exception $e) {
                h('notification.error', $e);

                if (empty($entry)) {
                    $model = null;
                }

                h('controller.update.error', array(
                    'error' => $e,
                    'model' => $entry,
                ));
            }
        }

        $this->data['entry'] = $entry;
    }