Get the current time of the OVH servers, since UNIX epoch

REST: GET /auth/time
12598
public Long time_GET() throws IOException {
		String qPath = "/auth/time";
		StringBuilder sb = path(qPath);
		String resp = execN(qPath, "GET", sb.toString(), null);
		return convertTo(resp, Long.class);
	}
361112
def __sethead(self, access_token):
        """"""
        self.access_token = access_token
        now = calendar.timegm(datetime.datetime.now().timetuple())
        self.expiration = now + 1800
        self.head = {"Authorization": "Bearer %s" % access_token,
                     "User-Agent": self.user_agent
                     }
374455
def server_version(self):
        """"""
        health_url = "%s/v1/sys/health" % self.vault_addr
        resp = self.session.request('get', health_url, **self._kwargs)
        if resp.status_code == 200 or resp.status_code == 429:
            blob = resp.json()
            if 'version' in blob:
                return blob['version']
        else:
            raise aomi.exceptions.VaultProblem('Health check failed')

        return None
633456
def _get_time(header, keys, name):
        
        for key in keys:
            try:
                date_value = header.pop(key)
            except KeyError:
                continue
            try:
                # String to convert
                return to_timestamp(parse(date_value))
            except TypeError:
                # Already number
                return float(date_value)
        raise UnsupportedOperation(name)
739594
def request_time(self) -> float:
        """"""
        if self._finish_time is None:
            return time.time() - self._start_time
        else:
            return self._finish_time - self._start_time
760214
def get_time_offset():
    
    try:
        resp = webapi.post('ITwoFactorService', 'QueryTime', 1, params={'http_timeout': 10})
    except:
        return None

    ts = int(time())
    return int(resp.get('response', {}).get('server_time', ts)) - ts
550865
function getServer() {
  var o = {}
    , uptime = process.uptime()
  o.version = this.version;
  o.os = process.platform;
  o.arch = process.arch;
  o.process_id = process.pid;

  o.tcp_port = this.state.addr && this.state.addr.port
    ? this.state.addr.port : NA;

  o.uptime_in_seconds = uptime;
  o.uptime_in_days = Math.floor(uptime / DAY_SECS);
  o.hz = this.conf.get(ConfigKey.HZ);
  o.config_file = this.conf.isDefault() ? '' : this.conf.getFile();
  return o;
}
479258
def http_time(time):
    """"""
    return formatdate(timeval=mktime(time.timetuple()), localtime=False, usegmt=True)
439216
def get_current_time(self):
        
        current_time = c_double()
        self.library.get_current_time.argtypes = [POINTER(c_double)]
        self.library.get_current_time.restype = None
        self.library.get_current_time(byref(current_time))
        return current_time.value
956731
def get_unixtime_registered(self):
        """"""

        doc = self._request(self.ws_prefix + ".getInfo", True)

        return int(doc.getElementsByTagName("registered")[0].getAttribute("unixtime"))
435483
function time() {
  let t = new Date().toString().split(' ');

  return {
    current: Date.now(),
    uptime: os.uptime(),
    timezone: (t.length >= 7) ? t[5] : '',
    timezoneName: (t.length >= 7) ? t.slice(6).join(' ').replace(/\(/g, '').replace(/\)/g, '') : ''
  };
}
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
646821
def get_current_time(self):
        
        hms = [int(self.get_current_controller_value(i)) for i in range(406, 409)]
        return datetime.time(*hms)
1261453
def get_system_time():
    '''
    
    '''
    now = win32api.GetLocalTime()
    meridian = 'AM'
    hours = int(now[4])
    if hours == 12:
        meridian = 'PM'
    elif hours == 0:
        hours = 12
    elif hours > 12:
        hours = hours - 12
        meridian = 'PM'
    return '{0:02d}:{1:02d}:{2:02d} {3}'.format(hours, now[5], now[6], meridian)
991514
def get_current_status(self):
        """"""
        url = get_url("/remote/status.json")
        params = {"oauth": self._oauth_token, "csrf": self._csrf_token}
        r = self._request(url=url, params=params)
        return r.json()
1284255
def get_epoch_time_from_str(s):
    
    try:
        return int(s)
    except:
        pass

    try:
        if s.startswith('-'):
            chars = {'d': 24 * 60 * 60,
                     'h': 60 * 60,
                     'm': 60,
                     's': 1}
            m = chars.get(s[-1])
            if m:
                n = float(s[1:-1])
                secs = int(n * m)
                now = int(time.time())
                return max((now - secs), 0)
    except:
        pass

    raise ValueError("'%s' is an unrecognised time format." % s)
730651
def Timestamp():
    
    timestamp = ''
    try:
        timestamp = str(datetime.datetime.now())+' UTC'
    except Exception as e:  # pragma: no cover
        logger.error('Could not get current time ' + str(e))
    return timestamp