Takes an optional last_save keyword argument
        other wise last_save will be set to timezone.now()

        Calls super to actually save the object.
768835
def save(self, *args, **kwargs):
        
        self.last_save = kwargs.pop('last_save', timezone.now())
        super(Cloneable, self).save(*args, **kwargs)
1087051
def save(opts={})
    options = { :validate => true }.merge(opts)
    return false if !(new_record? || changed?)
    if options[:validate]
      return false if !valid?
    end
    begin
      save!(options)
    rescue
      return false
    end
    true
  end
303788
def last_updated(self):
        '''
        
        '''
        derived_path = self.context.request.url
        timestamp_key = self.timestamp_key_for(derived_path)

        if self.exists(self.timestamp_key_for, derived_path):
            return self.storage.get(timestamp_key)

        return None
279116
def set(self, instance, value, **kwargs):
        
        val = get_date(instance, value)
        super(DateTimeField, self).set(instance, val, **kwargs)
941030
def set_timestamp(self, timestamp=str(datetime.datetime.utcfromtimestamp(time.time()))):
        
        self.timestamp = timestamp
156486
def set_last_access(self, tag):
        """"""
        import time
        # time defeats check that value didn't change

        self.buildstate.access.last = '{}-{}'.format(tag, time.time())
        self.buildstate.commit()
1362140
def save(self, *args, **kwargs):
        
        try:
            prev_instance = self.__class__.objects.get(pk=self.pk)
        except self.DoesNotExist:
            prev_instance = None

        if prev_instance is None or (not prev_instance.is_active and self.is_active or
                                     self.schedule != prev_instance.schedule):
            self.update_next_trigger_at()

        super(ScheduleMixin, self).save(*args, **kwargs)
754157
def now(cls, Name = None):
		
		self = cls()
		if Name is not None:
			self.Name = Name
		self.pcdata = datetime.datetime.utcnow()
		return self
612757
def save(self, *args, **kwargs):
        
        self.geocode()
        return super(GeoMixin, self).save(*args, **kwargs)
287145
def _save(self, data):
        
        self.state = data.get('state')
        self.created = dt_time(data.get('created'))
        self.updated = dt_time(data.get('updated'))
192406
def set_update_time(self, update_time=None):
        
        if update_time and isinstance(update_time, (datetime.datetime,)):
            self.last_update_time = update_time
        else:
            self.last_update_time = datetime.datetime.utcnow()
394509
protected function _beforeSave()
    {
        $date = Mage::getModel('core/date')->gmtDate();
        if ($this->isObjectNew() && !$this->getCreatedAt()) {
            $this->setCreatedAt($date);
        }
        $this->setStackData(serialize($this->stackLog));
        return parent::_beforeSave();
    }
551307
def now(self):
        ''' 
        '''
        utcnow = datetime.utcnow()
        return utcnow + timedelta(hours=self.time_zone)
729245
def save(self, force=False):
        
        from time import time

        # Since the DBs can get rather large, we don't want to save them every
        # single time a method is called. Instead, we only save them at the
        # frequency specified in the global settings file.
        from datetime import datetime
        savefreq = TaskDB.get_option("savefreq", 2, int)
        
        if self.lastsave is not None:
            delta = (datetime.fromtimestamp(time()) -
                     datetime.fromtimestamp(self.lastsave)) 
            elapsed = int(delta.total_seconds()/60)
        else:
            elapsed = savefreq + 1

        if elapsed > savefreq or force:
            if not writeable:
                #We still overwrite the lastsave value so that this message doesn't
                #keep getting output for every :meth:`record` call.
                self.lastsave = time()
                msg.std("Skipping database write to disk by setting.", 2)
                return

            import json
            try:
                entities, compkeys = _json_clean(self.entities)
                jdb = {"entities": entities,
                       "compkeys": compkeys,
                       "uuids": self.uuids}
                with open(self.dbpath, 'w') as f:
                    json.dump(jdb, f)
            except: # pragma: no cover
                from acorn.msg import err
                import sys
                raise
                err("{}: {}".format(*sys.exc_info()[0:2]))

            self.lastsave = time()
307400
def last_modified(self) -> Optional[datetime.datetime]:
        
        httpdate = self._headers.get(hdrs.LAST_MODIFIED)
        if httpdate is not None:
            timetuple = parsedate(httpdate)
            if timetuple is not None:
                return datetime.datetime(*timetuple[:6],
                                         tzinfo=datetime.timezone.utc)
        return None
101713
def lastsave(host=None, port=None, db=None, password=None):
    '''
    
    '''
    # Use of %s to get the timestamp is not supported by Python. The reason it
    # works is because it's passed to the system strftime which may not support
    # it. See: https://stackoverflow.com/a/11743262
    server = _connect(host, port, db, password)
    if six.PY2:
        return int((server.lastsave() - datetime(1970, 1, 1)).total_seconds())
    else:
        return int(server.lastsave().timestamp())
1214853
def in_to_at(expires_in)
      if expires_in.to_i < 1
        0
      else
        Time.now.utc.to_i + expires_in.to_i
      end
    end