Returns last FTP site update time
482425
def __get_last_update_time():
    ''''''
    now = datetime.datetime.utcnow()

    # Get the first Tuesday of the month
    first_tuesday = __get_first_tuesday(now)

    if first_tuesday < now:
        return first_tuesday
    else:
        first_of_month = datetime.datetime(now.year, now.month, 1)
        last_month = first_of_month + datetime.timedelta(days=-1)
        return __get_first_tuesday(last_month)
677261
def last_edit_time(self):
        
        data = {'_xsrf': self.xsrf, 'offset': '1'}
        res = self._session.post(self.url + 'log', data=data)
        _, content = res.json()['msg']
        soup = BeautifulSoup(content)
        time_string = soup.find_all('time')[0]['datetime']
        return datetime.strptime(time_string, "%Y-%m-%d %H:%M:%S")
1149447
public function getModifiedAt() {
		$timestamp = filemtime($this->pathname);
		$time = new DateTime();
		$time->setTimestamp($timestamp);
		return $time;
	}
212343
def last_seen(self):
        """
        These values seem to be rarely updated correctly in the API.
        Don't expect accurate results from this property.
        """
        try:
            if self.side == 'left':
                lastseen = self.device.device_data['leftPresenceEnd']
            elif self.side == 'right':
                lastseen = self.device.device_data['rightPresenceEnd']

            date = datetime.fromtimestamp(int(lastseen)) \
                .strftime('%Y-%m-%dT%H:%M:%S')
            return date
        except TypeError:
            return None
173346
def is_up_to_date(self):
        """"""
        if self.builder is not MkdirBuilder and not self.exists():
            return 0
        up_to_date = SCons.Node.up_to_date
        for kid in self.children():
            if kid.get_state() > up_to_date:
                return 0
        return 1
1095876
def get_days_since_last_modified(filename):
        
        now = datetime.now()
        last_modified = datetime.fromtimestamp(os.path.getmtime(filename))
        return (now - last_modified).days
1204743
def last_modified(self):
        
        if self.get('Last-Modified'):
            return arrow.get(self.get('Last-Modified'))
        return self.date
820967
def ReadClientLastPings(self,
                          min_last_ping=None,
                          max_last_ping=None,
                          fleetspeak_enabled=None,
                          cursor=None):
    """"""
    query = "SELECT client_id, UNIX_TIMESTAMP(last_ping) FROM clients "
    query_values = []
    where_filters = []
    if min_last_ping is not None:
      where_filters.append("last_ping >= FROM_UNIXTIME(%s) ")
      query_values.append(mysql_utils.RDFDatetimeToTimestamp(min_last_ping))
    if max_last_ping is not None:
      where_filters.append(
          "(last_ping IS NULL OR last_ping <= FROM_UNIXTIME(%s))")
      query_values.append(mysql_utils.RDFDatetimeToTimestamp(max_last_ping))
    if fleetspeak_enabled is not None:
      if fleetspeak_enabled:
        where_filters.append("fleetspeak_enabled IS TRUE")
      else:
        where_filters.append(
            "(fleetspeak_enabled IS NULL OR fleetspeak_enabled IS FALSE)")

    if where_filters:
      query += "WHERE " + "AND ".join(where_filters)
    cursor.execute(query, query_values)
    last_pings = {}
    for int_client_id, last_ping in cursor.fetchall():
      client_id = db_utils.IntToClientID(int_client_id)
      last_pings[client_id] = mysql_utils.TimestampToRDFDatetime(last_ping)
    return last_pings
103664
def last_modified():
    
    files = model.FileFingerprint.select().order_by(
        orm.desc(model.FileFingerprint.file_mtime))
    for file in files:
        return file.file_mtime, file.file_path
    return None, None
1338797
def last_written_time(self):
    """"""
    if self._last_written_time is None:
      return dfdatetime_semantic_time.SemanticTime('Not set')

    return dfdatetime_filetime.Filetime(timestamp=self._last_written_time)
1020881
private Date getLastModifiedTime(URL url) {

		// see http://stackoverflow.com/questions/2416872/how-do-you-obtain-modified-date-from-a-remote-file-java
		Date date = null;
		try {
			String lastModified = url.openConnection().getHeaderField("Last-Modified");
			logger.debug("Last modified date of server file ({}) is {}",url.toString(),lastModified);


			if (lastModified!=null) {

				try {
					date = new SimpleDateFormat("E, d MMM yyyy HH:mm:ss Z", Locale.ENGLISH).parse(lastModified);
				} catch (ParseException e) {
					logger.warn("Could not parse last modified time from string '{}', no last modified time available for file {}",
							lastModified, url.toString());
					// this will return null
				}

			}
		} catch (IOException e) {
			logger.warn("Problems while retrieving last modified time for file {}", url.toString());
		}
		return date;

	}
1065468
def download():
    

    ftp = ftplib.FTP(SITE)
    ftp.set_debuglevel(DEBUG)
    ftp.login(USER, PASSWD)
    ftp.cwd(DIR)
    filelist = ftp.nlst()
    filecounter = MANAGER.counter(total=len(filelist), desc='Downloading',
                                  unit='files')

    for filename in filelist:

        with Writer(filename, ftp.size(filename), DEST) as writer:
            ftp.retrbinary('RETR %s' % filename, writer.write)
        print(filename)
        filecounter.update()

    ftp.close()
71200
public function lastModified()
	{
		$source = $this->targetPath();

		if ($this->declaration || !is_file($source))
		{
			return 0;
		}

		return filemtime($source);
	}
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
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;
    }
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())
673664
function get_update( $plugin_id = false, $flush = true, $expiration = WP_FS__TIME_24_HOURS_IN_SEC, $newer_than = false ) {
            $this->_logger->entrance();

            if ( ! is_numeric( $plugin_id ) ) {
                $plugin_id = $this->_plugin->id;
            }

            $this->check_updates( true, $plugin_id, $flush, $expiration, $newer_than );
            $updates = $this->get_all_updates();

            return isset( $updates[ $plugin_id ] ) && is_object( $updates[ $plugin_id ] ) ? $updates[ $plugin_id ] : false;
        }