Returns a formatted string with the current local time.
170887
def getLTime():
    """"""

    _ltime = _time.localtime(_time.time())
    tlm_str = _time.strftime('%H:%M:%S (%d/%m/%Y)', _ltime)
    return tlm_str
222521
def _getFromTime(self, atDate=None):
        
        return getLocalTime(self.date, self.time_from, self.tz)
460342
def format_time(timestamp, time_format="%Y-%m-%d %H:%M:%S", never_placeholder="never", gmt=False):
    """"""
    if not timestamp:
        return never_placeholder
    return time.strftime(time_format, time.gmtime(timestamp) if gmt else time.localtime(timestamp))
1190713
public function toDateISOLocal() : string
    {
        if ($this->timezoneIsLocal) {
            $that = $this;
        } else {
            $that = (clone $this)->setTimezone(static::$timezoneLocal);
        }
        return $that->format('Y-m-d');
    }
881581
public static String format(final LocalTime self, String pattern) {
        return self.format(DateTimeFormatter.ofPattern(pattern));
    }
378013
def format_time(time_string):
    '''
    
    '''
    subseconds = False
    data = time_string.split("_")
    hours, minutes, seconds = int(data[3]), int(data[4]), int(data[5])
    date = datetime.datetime.strptime("_".join(data[:3]), "%Y_%m_%d")
    subsec = 0.0
    if len(data) == 7:
        if float(data[6]) != 0:
            subsec = float(data[6]) / 10**len(data[6])
            subseconds = True
    date_time = date + \
        datetime.timedelta(hours=hours, minutes=minutes,
                           seconds=seconds + subsec)
    return date_time, subseconds
885857
def current_time(self) -> datetime:
        """"""
        _date = datetime.strptime(self.obj.SBRes.SBReq.StartT.get("date"), "%Y%m%d")
        _time = datetime.strptime(self.obj.SBRes.SBReq.StartT.get("time"), "%H:%M")
        return datetime.combine(_date.date(), _time.time())
1217699
def _getLocalWhen(self, date_from, date_to=None):
        
        dateFrom, timeFrom = getLocalDateAndTime(date_from, self.time_from,
                                                 self.tz, dt.time.min)

        if date_to is not None:
            dateTo, timeTo = getLocalDateAndTime(date_to, self.time_to, self.tz)
        else:
            if self.time_to is not None:
                dateTo, timeTo = getLocalDateAndTime(date_from, self.time_to, self.tz)
            else:
                dateTo = dateFrom
                timeTo = None

        if dateFrom == dateTo:
            retval = _("{date} {atTime}").format(date=dateFormat(dateFrom),
                        atTime=timeFormat(timeFrom, timeTo, gettext("at ")))
        else:
            retval = _("{date} {atTime}").format(date=dateFormat(dateFrom),
                        atTime=timeFormat(timeFrom, prefix=gettext("at ")))
            retval = _("{dateTimeFrom} to {dateTo} {atTimeTo}").format(
                        dateTimeFrom=retval.strip(),
                        dateTo=dateFormat(dateTo),
                        atTimeTo=timeFormat(timeTo, prefix=gettext("at ")))
        return retval.strip()
735313
def date_local(self) -> datetime:
        """"""
        return datetime.fromtimestamp(self._node["date"] if "date" in self._node else self._node["taken_at_timestamp"])
587612
@GET
    @Produces({ MediaType.TEXT_PLAIN })
    public String getTime() {
        return String.valueOf(System.currentTimeMillis());
    }
835325
def format(date, now=None, locale='en'):
    '''
    
    '''
    if not isinstance(date, timedelta):
        if now is None:
            now = datetime.now()
        date = parser.parse(date)
        now = parser.parse(now)

        if date is None:
            raise ParameterUnvalid('the parameter `date` should be datetime '
                                   '/ timedelta, or datetime formated string.')
        if now is None:
            raise ParameterUnvalid('the parameter `now` should be datetime, '
                                   'or datetime formated string.')
        date = now - date
    # the gap sec
    diff_seconds = int(total_seconds(date))

    # is ago or in
    ago_in = 0
    if diff_seconds < 0:
        ago_in = 1  # date is later then now, is the time in future
        diff_seconds *= -1  # chango to positive

    tmp = 0
    i = 0
    while i < SEC_ARRAY_LEN:
        tmp = SEC_ARRAY[i]
        if diff_seconds >= tmp:
            i += 1
            diff_seconds /= tmp
        else:
            break
    diff_seconds = int(diff_seconds)
    i *= 2

    if diff_seconds > (i == 0 and 9 or 1):
        i += 1

    if locale is None:
        locale = DEFAULT_LOCALE

    tmp = timeago_template(locale, i, ago_in)
    if hasattr(tmp, '__call__'):
        tmp = tmp(diff_seconds)
    return '%s' in tmp and tmp % diff_seconds or tmp
1365876
function getTimeString (now) {
  var year = "" + now.getFullYear();
  var month = "" + (now.getMonth() + 1); if (month.length == 1) { month = "0" + month }
  var day = "" + now.getDate(); if (day.length == 1) { day = "0" + day }
  var hour = "" + now.getHours(); if (hour.length == 1) { hour = "0" + hour }
  var minute = "" + now.getMinutes(); if (minute.length == 1) { minute = "0" + minute }
  var second = "" + now.getSeconds(); if (second.length == 1) { second = "0" + second }
  var ms = "" + now.getMilliseconds(); while (ms.length < 3) { ms = "0"+ms }
  return year + "-" + month + "-" + day + " " + hour + ":" + minute + ":" + second + "." + ms;
}
302160
def get_time_at(time_in=None, time_at=None, out_fmt='%Y-%m-%dT%H:%M:%S'):
    '''
    
    '''
    dt = get_timestamp_at(time_in=time_in, time_at=time_at)
    return time.strftime(out_fmt, time.localtime(dt))
479258
def http_time(time):
    """"""
    return formatdate(timeval=mktime(time.timetuple()), localtime=False, usegmt=True)
135264
public static String time2String(java.sql.Timestamp time, Locale locale) {
        DateFormat df = DateFormat.getDateTimeInstance(dateStyle, timeStyle, locale);
        return df.format(time);
    }
238693
public String printShortLocaleDate()
  {
    _date.setTime(_localTimeOfEpoch);

    if (_shortDateFormat == null)
      _shortDateFormat = DateFormat.getDateInstance(DateFormat.SHORT);

    return _shortDateFormat.format(_date);
  }
1267600
public static final String formatCurrentTime() {
        DateFormat sdf = dateformats.get();
        if (sdf == null) {
            sdf = getDateFormat();
            dateformats.set(sdf);
        }
        return "[" + sdf.format(new Date()) + "] ";
    }