Returns a string describing 'time' as a time relative to the current time.

Missing fields from 'time' are filled in with values from the current time.

@see #getRelativeTimeSpanString(Context, ReadableInstant, int)
195741
public static CharSequence getRelativeTimeSpanString(Context context, ReadablePartial time) {
        return getRelativeTimeSpanString(context, time.toDateTime(DateTime.now()));
    }
294035
def get_time():
    
    import datetime
    time=make_pathable_string('%s' % datetime.datetime.now())
    return time.replace('-','_').replace(':','_').replace('.','_')
573283
def strptime(time_str, time_format):
        
        try:
            datetime_obj = datetime.strptime(time_str, time_format)
            return datetime_obj
        except ValueError as ex:
            raise ValueError(ex)
206123
public static String format(Date time) {
        DateFormat timeFormat = new SimpleDateFormat(TimeField.FORMAT);
        return time == null ? null : timeFormat.format(time);
    }
1165276
public static Date strToTime(String time) throws ParseException {

        java.text.SimpleDateFormat sdf = new java.text.SimpleDateFormat("yyyyMMdd:HH");

        java.util.Date d = sdf.parse(time);

        return d;
    }
972093
public java.lang.String getTimelineLabel() {
    java.lang.Object ref = timelineLabel_;
    if (ref instanceof java.lang.String) {
      return (java.lang.String) ref;
    } else {
      com.google.protobuf.ByteString bs = 
          (com.google.protobuf.ByteString) ref;
      java.lang.String s = bs.toStringUtf8();
      timelineLabel_ = s;
      return s;
    }
  }
991736
def str_to_time(time_str: str) -> datetime.datetime:
    
    pieces: Any = [int(piece) for piece in time_str.split('-')]
    return datetime.datetime(*pieces)
997864
def getCurrentStrDatetime():
    
    # Generating current time
    i = datetime.datetime.now()
    strTime = "%s-%s-%s_%sh%sm" % (i.year, i.month, i.day, i.hour, i.minute)
    return strTime
1066282
function parseTime(points, timeField, context) {
    _.each(points, function(pt) {
        if (timeField && !pt[timeField]) {
            context.trigger('warning', new errors.runtimeError('POINT-MISSING-TIME', {field: timeField}));
        }

        var time = pt[timeField || 'time'];
        if (time) {
            pt.time = time;
            if (timeField !== 'time') {
                delete pt[timeField];
            }
        }
    });

    toNative(points);

    return points;
}
182776
private Date getTimeFromInteger(Integer time)
   {
      Date result = null;

      if (time != null)
      {
         int minutes = time.intValue();
         int hours = minutes / 60;
         minutes -= (hours * 60);

         Calendar cal = DateHelper.popCalendar();
         cal.set(Calendar.MILLISECOND, 0);
         cal.set(Calendar.SECOND, 0);
         cal.set(Calendar.MINUTE, minutes);
         cal.set(Calendar.HOUR_OF_DAY, hours);
         result = cal.getTime();
         DateHelper.pushCalendar(cal);
      }

      return (result);
   }
491124
public static String[] getHourMinuteSecondTimeString(long time) {

        int hours = (int)time / (1000 * 60 * 60);
        int min = (int)(time - (hours * 1000 * 60 * 60)) / (1000 * 60);
        int sec = (int)(time - (hours * 1000 * 60 * 60) - (min * 1000 * 60)) / 1000;

        return new String[] {getTwoDigitsString(hours), getTwoDigitsString(min), getTwoDigitsString(sec)};
    }
460388
function substituteTimeAgo(string, number, withoutSuffix, isFuture, lang) {
        return lang.relativeTime(number || 1, !!withoutSuffix, string, isFuture);
    }
377607
public String getTimeStampStr()
    {
        if (_timeStampStr == null && _timeStamp > 0)
                _timeStampStr = HttpFields.__dateCache.format(_timeStamp);
        return _timeStampStr;
    }
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())
1236385
static String formatTime() {
        Date date = new Date();
        DateFormat formatter = BaseTraceFormatter.useIsoDateFormat ? new SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ss.SSSZ") : DateFormatProvider.getDateFormat();
        StringBuffer answer = new StringBuffer();
        answer.append('[');
        formatter.format(date, answer, new FieldPosition(0));
        answer.append(']');
        return answer.toString();
    }
64940
private String getStrTime(Calendar c)
   {
      int h = c.get(Calendar.HOUR);
      int m = c.get(Calendar.MINUTE);
      int s = c.get(Calendar.SECOND);
      return "" + (h < 10 ? "0" + h : h) + (m < 10 ? "0" + m : m) + (s < 10 ? "0" + s : s);
   }
151739
public com.google.protobuf.ByteString
      getTimelineLabelBytes() {
    java.lang.Object ref = timelineLabel_;
    if (ref instanceof java.lang.String) {
      com.google.protobuf.ByteString b = 
          com.google.protobuf.ByteString.copyFromUtf8(
              (java.lang.String) ref);
      timelineLabel_ = b;
      return b;
    } else {
      return (com.google.protobuf.ByteString) ref;
    }
  }