Sets the `syncedAt` and `createdAt` timestamps, if they are not set.
183255
function ensureTimestamps(columns, allowSyncedAt) {
  var now = Date.now();
  if (!allowSyncedAt || !columns.syncedAt) {
    columns.syncedAt = now;
  }
  if (!columns.createdAt) {
    // Take the value from the client, if present:
    columns.createdAt = columns.updatedAt;
  }
}
854370
protected function timestampUpdate()
    {
        $this->updated = date('Y-m-d H:i:s');
        $this->id || $this->created = $this->updated;
    }
1193673
public function timestamp()
    {
        $this->updateTime = AnDomainAttributeDate::getInstance();

        if (!isset($this->creationTime)) {
            $this->creationTime = AnDomainAttributeDate::getInstance();
        }
    }
941030
def set_timestamp(self, timestamp=str(datetime.datetime.utcfromtimestamp(time.time()))):
        
        self.timestamp = timestamp
67718
public function setUpdatedAtDateTime(?DateTime $updatedAt): void
    {
        $this->updated_at = $updatedAt === null ? null : $updatedAt->format('Y-m-d H:i:s');
    }
1144327
public void assignTimestamp(XEvent event, long time) {
		XAttributeTimestamp attr = (XAttributeTimestamp) ATTR_TIMESTAMP.clone();
		attr.setValueMillis(time);
		event.getAttributes().put(KEY_TIMESTAMP, attr);
	}
841860
public function nullableTimestamps()
	{
		$timestamp = $this->timestamp('created_at');

		if(is_object($timestamp))
			$timestamp->nullable();

		$timestamp = $this->timestamp('updated_at');

		if(is_object($timestamp))
			$timestamp->nullable();
	}
67204
def set_created_at
      self.created_at ||= DateTime.now.in_time_zone(Time.zone) if Dynamoid::Config.timestamps
    end
878877
def __set_timestamp(self, clock):
        
        if clock is None:
            unix_timestamp = time.mktime(
                datetime.datetime.now().utctimetuple()
            )
            timestamp = int(unix_timestamp)

            return timestamp

        else:
            return clock
66002
public function setTimestamp($timestamp = 0)
    {
        $this->timestamp = $timestamp;
        if ($timestamp === 0) {
            $this->timestamp = $this->generateTimestamp();
        }
        return $this;
    }
44500
private void marshalCreatedAndUpdatedTimestamp() {
    PropertyMetadata createdTimestampMetadata = entityMetadata.getCreatedTimestampMetadata();
    PropertyMetadata updatedTimestampMetadata = entityMetadata.getUpdatedTimestampMetadata();
    long millis = System.currentTimeMillis();
    if (createdTimestampMetadata != null) {
      applyAutoTimestamp(createdTimestampMetadata, millis);
    }
    if (updatedTimestampMetadata != null) {
      applyAutoTimestamp(updatedTimestampMetadata, millis);
    }
  }
900948
protected function setUpdatedAt()
    {
        // Convert created_at back to GMT for saving
        if (isset($this->created_at)) {
            $this->created_at = Time::localToGmt($this->created_at);
        }

        // Set updated at
        if (!isset($this->updated_at) or $this->updated_at === null) {
            $this->updated_at = 'NOW()';
        }
    }
216198
public void setTimestamp( String parameterName, Timestamp value ) throws OdaException
	{
		// only applies to named input parameter
		parameters.put(parameterName, value);
	}
200144
public function setCreatedAt($createdAt)
    {
        if ($createdAt instanceof \DateTime
            || (is_object($createdAt) && method_exists($createdAt, 'format'))) {
            $this->createdAt = $createdAt->format('Y-m-d H:i:s');
        } else {
            $this->createdAt = $createdAt;
        }
    }
786283
public void setTimestamp(String timestamp) throws ParseException {
        this.analysisTimestamp = new SimpleDateFormat(TIMESTAMP_FORMAT, Locale.ENGLISH).parse(timestamp);
    }
739252
public function withTimestamps($createdAt = null, $updatedAt = null)
    {
        $this->pivotCreatedAt = $createdAt;
        $this->pivotUpdatedAt = $updatedAt;

        return $this->withPivot($this->createdAt(), $this->updatedAt());
    }
1000497
def set_timestamp_to_current(self):
        
        # Good form to add tzinfo
        self.timestamp = pytz.UTC.localize(datetime.datetime.utcnow())