Gets the last known updatedAt timestamp. For incremental pull, we check if we have any information about it in the store. If not we simply use 1970 to start the sync operation, just like a non-incremental / vanilla pull.
485022
function getLastKnownUpdatedAt() {
        
        return Platform.async(function(callback) {
            callback();
        })().then(function() {
            
            if (pullQueryId) { // read lastKnownUpdatedAt from the store
                return store.lookup(pulltimeTableName, pullQueryId, true /* suppressRecordNotFoundError */);
            }

        }).then(function(result) {

            if (result) {
                return result.value;
            }

            return new Date (1970, 0, 0);
        });
    }
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;
  }
}
841090
public long getTimestamp() {
		Long res = getEntity(invokeGet("utils/timestamp", null), Long.class);
		return res != null ? res : 0L;
	}
1156717
def polymorphic_update_timestamp(session, flush_context, instances):
    
    for obj in session.dirty:
        if not isinstance(obj, Entity):
            continue
        state = sa.inspect(obj)
        history = state.attrs["updated_at"].history
        if not any((history.added, history.deleted)):
            obj.updated_at = datetime.utcnow()
440833
public String getTimestamp() {
        return (data != null && data.payload != null) ? data.payload.timestamp : null;
    }
445290
def with_timestamps(self, created_at=None, updated_at=None):
        
        if not created_at:
            created_at = self.created_at()

        if not updated_at:
            updated_at = self.updated_at()

        return self.with_pivot(created_at, updated_at)
647030
def current_timestamp(self) -> datetime:
        """"""
        timestamp = DB.get_hash_value(self._key, 'current_timestamp')
        return datetime_from_isoformat(timestamp)
1352300
public long getTimestamp()
    {
        while (true)
        {
            long current = System.currentTimeMillis() * 1000;
            long last = lastTimestampMicros.get();
            long tstamp = last >= current ? last + 1 : current;
            if (lastTimestampMicros.compareAndSet(last, tstamp))
                return tstamp;
        }
    }
1012466
private function updateDiffTimestamp()
    {
        $diffTimestamp = 0;
        $lastTimeStamp = 0;
        $lastActivity = 0;
        if (isset($this->data[DeliveryMonitoringService::LAST_PAUSE_TIMESTAMP])) {
            $lastTimeStamp = $this->data[DeliveryMonitoringService::LAST_PAUSE_TIMESTAMP];
        }

        if (isset($this->data[DeliveryMonitoringService::LAST_TEST_TAKER_ACTIVITY])) {
            $lastActivity = $this->data[DeliveryMonitoringService::LAST_TEST_TAKER_ACTIVITY];
        }

        if ($lastTimeStamp - $lastActivity > 0) {
            $diffTimestamp = isset($this->data[DeliveryMonitoringService::DIFF_TIMESTAMP]) ? $this->data[DeliveryMonitoringService::DIFF_TIMESTAMP] : 0;
            $diffTimestamp += $lastTimeStamp - $lastActivity;
        }

        $this->addValue(DeliveryMonitoringService::DIFF_TIMESTAMP, $diffTimestamp, true);
    }
630913
function timeStamp()
    {
        $cur_date = getdate();
        $longtimestamp = mktime( $this->hour(),
                                 $this->minute(),
                                 $this->second(),
                                 $cur_date[ 'mon' ],
                                 $cur_date[ 'mday' ],
                                 $cur_date[ 'year' ] );
        return $longtimestamp;
    }
972770
public LogicalTimestamp update(LogicalTimestamp timestamp) {
    if (timestamp.value() > currentTimestamp.value()) {
      this.currentTimestamp = timestamp;
    }
    return currentTimestamp;
  }
1002200
def updated(self):
        ''
        return dateutil.parser.parse(str(self.f.latestRevision.updated))
1009661
public String getLastUpdatedString() {
        long newestTs = 0;
        for (UpdateSite s : sites) {
            if (s.getDataTimestamp()>newestTs) {
                newestTs = s.getDataTimestamp();
            }
        }
        if (newestTs == 0) {
            return Messages.UpdateCenter_n_a();
        }
        return Util.getPastTimeString(System.currentTimeMillis()-newestTs);
    }
952870
def last_change(self):
        
        try:
            cdt = self.latest('created')
            udt = self.latest('updated')
            #print cdt, udt
            return max(cdt.created, udt.updated)

        except ObjectDoesNotExist:
            return None
841451
def check_stale(package_info, *args):
    
    reason = 'Package not updated in {} days'.format(DAYS_STALE)
    result = False

    now = datetime.utcnow()

    release_urls = args[0]
    if len(release_urls) > 0:
        package_uploaded_time = release_urls[0]['upload_time']
        if now - timedelta(days=DAYS_STALE) <= package_uploaded_time:
            result = True

    return result, reason, NOT_STALE
43566
public function lastUpdatedDate() {
    $directory = $this->environment->getHooksDirectory();
    $hooks_file = "$directory/hooks_processed.php";
    if (file_exists($hooks_file)) {
      $timestamp = filemtime($hooks_file);
      return $timestamp;
    }
  }
1226245
static long getLastUpdateTime(Context context) {
        long lastTime = 0L;
        if (context != null) {
            try {
                final PackageInfo packageInfo = context.getPackageManager().getPackageInfo(context.getPackageName(), 0);
                lastTime = packageInfo.lastUpdateTime;
            } catch (Exception e) {
                PrefHelper.LogException("Error obtaining LastUpdateTime", e);
            }
        }

        return lastTime;
    }