Retrieve timestring for client "now"
@returns {String}
7259
function clientNow() {
  var d = new Date();
  var offset = -1 * d.getTimezoneOffset();

  d.setUTCMinutes(d.getUTCMinutes() + offset);
  return d.toISOString().replace('Z', minutesToOffsetString(offset));
}
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")
982494
function () {
    /**
     * Return the current timestamp integer.
     */
    var now = Date.now || function () {
      return new Date().getTime();
    };

    // Keep track of the previous "animation frame" manually.
    var prev = now();

    return function (fn) {
      var curr = now();
      var ms   = Math.max(0, 16 - (curr - prev));
      var req  = setTimeout(fn, ms);

      prev = curr;

      return req;
    };
  }
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
1120050
def parse_now_field(s):
    """"""
    if not s.startswith('UTC:'):
        return None  # Invalid string
    s = s[4:]

    # isoformat can return strings both with and without microseconds - we
    # account for both
    try:
        dt = datetime.datetime.strptime(s, '%Y-%m-%dT%H:%M:%S.%f')
    except ValueError:
        dt = datetime.datetime.strptime(s, '%Y-%m-%dT%H:%M:%S')

    return dt
1296863
function getLetterTime(timeString) {
  var totalSeconds = 0;
  var timeValues = {
    's': 1,
    'm': 1 * 60,
    'h': 1 * 60 * 60,
    'd': 1 * 60 * 60 * 24,
    'w': 1 * 60 * 60 * 24 * 7,
  };
  var timePairs;

  //expand to "1 h 30 m 20 s" and split
  timeString = timeString.replace(/([smhdw])/g, ' $1 ').trim();
  timePairs = timeString.split(' ');

  for (var i = 0; i < timePairs.length; i += 2) {
    totalSeconds += parseInt(timePairs[i], 10) *
      timeValues[timePairs[i + 1] || 's'];
  }
  return totalSeconds;
}
377607
public String getTimeStampStr()
    {
        if (_timeStampStr == null && _timeStamp > 0)
                _timeStampStr = HttpFields.__dateCache.format(_timeStamp);
        return _timeStampStr;
    }
1255108
def now(format_string):
    
    from datetime import datetime
    from django.utils.dateformat import DateFormat
    return DateFormat(datetime.now()).format(self.format_string)
1199279
def get_client_nowait(self):
        
        if self.__sem is not None:
            if self.__sem._value == 0:
                return None
            self.__sem.acquire()
        _, client = self._get_client_from_pool_or_make_it()
        return client
895885
function getIso8601String(timeMs) {
  var time = new Date();
  time.setTime(timeMs);
  return '' +
      time.getUTCFullYear() + '-' +
      leftPadNumber(time.getUTCMonth() + 1, 2, '0') + '-' +
      leftPadNumber(time.getUTCDate(), 2, '0') + 'T' +
      leftPadNumber(time.getUTCHours(), 2, '0') + ':' +
      leftPadNumber(time.getUTCMinutes(), 2, '0') + ':' +
      leftPadNumber(time.getUTCSeconds(), 2, '0') + 'Z';
}
331891
def pretty_now():
    """'"""
    import datetime, tzlocal
    time_zone = tzlocal.get_localzone()
    now       = datetime.datetime.now(time_zone)
    return now.strftime("%Y-%m-%d %H:%M:%S %Z%z")
891835
def get_time_now(self):
        """"""
        import datetime
        import getpass
        username = getpass.getuser()
        # this is not working on some systems: os.environ["USERNAME"]
        timenow = str(datetime.datetime.now())
        timenow = timenow.split('.')[0]
        msg = '<div class="date">Created on ' + timenow
        msg += " by " + username +'</div>'
        return msg
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, '') : ''
  };
}
950736
def timesince(self, now=None):
        
        from django.utils.timesince import timesince as timesince_
        return timesince_(self.timestamp, now)
386642
def date_in_past(self):
        
        now = datetime.datetime.now()
        return (now.date() > self.date)
644902
function getCurrentData() {
    let currentData = storage.getDataByKey(savedDataKey);

    if (!currentData) {
        let chartType = getCurrentType();
        let {initialDataType} = defaultConfig[chartType];

        currentData = defaultData[chartType][initialDataType];

        storage.setDataByKey(savedDataKey, currentData);
    }

    return currentData;
}
847560
function now() {
      var pos = {line: line, column: column}

      pos.offset = self.toOffset(pos)

      return pos
    }