Returns the timecode in FFmpeg format. The format of the timecode is hh:mm:ss:uuuuuu (where u = microseconds). The hours
component counts days as well (i.e. <code>01:01:01:01:00</code> will be encoded as <code>25:01:01.000000</code>)
546581
public String toFfmpegString()
	{
		final long hours = this.hours + (24 * this.days);

		return String.format("%02d:%02d:%02d.%06d", hours, minutes, seconds, getFramesPartAsMicroseconds());
	}
1148755
private static String formatTimeLive(long timeLive) {
    String timeString = "ms";
    timeString = (timeLive % 1000) + timeString;
    timeLive = timeLive / 1000;
    if(timeLive > 0) {
      timeString = (timeLive % 60) + "s" + timeString;
      timeLive = timeLive / 60;
      if(timeLive > 0) {
        timeString = (timeLive % 60) + "m" + timeString;
        timeLive = timeLive / 60;
        if(timeLive > 0) {
          timeString = (timeLive % 24) + "h" + timeString;
          timeLive = timeLive / 24;
          if(timeLive > 0) {
            timeString = (timeLive) + "d" + timeString;
          }
        }
      }
    }
    return timeString;
  }
1247737
public String getTimeString()
	{
		Calendar cal = getCalendar();
		return
			toClockString(cal.get(Calendar.HOUR)) +
			(((cal.get(Calendar.SECOND) % 2) == 0) ? ":" : " ") +
			toClockString(cal.get(Calendar.MINUTE));
	}
69507
def _datetime(self):
        
        if 'dt' not in self._cache.keys():
            self._cache['dt'] = self.MJD_T0 + timedelta(days=self._d, seconds=self._s)
        return self._cache['dt']
1088676
def CopyToDateTimeString(self):
    
    if (self._timestamp is None or self._timestamp < 0 or
        self._timestamp > self._UINT64_MAX):
      return None

    timestamp, remainder = divmod(self._timestamp, self._100NS_PER_SECOND)
    number_of_days, hours, minutes, seconds = self._GetTimeValues(timestamp)

    year, month, day_of_month = self._GetDateValuesWithEpoch(
        number_of_days, self._EPOCH)

    return '{0:04d}-{1:02d}-{2:02d} {3:02d}:{4:02d}:{5:02d}.{6:07d}'.format(
        year, month, day_of_month, hours, minutes, seconds, remainder)
966409
def parse_hh_mm_ss(self):
        
        split_count = self.raw.count(":")

        if split_count == 2:  # hh:mm:ss
            return datetime.strptime(str(self.raw).strip(), "%H:%M:%S").time()
        elif split_count == 1:  # mm:ss
            return datetime.strptime(str(self.raw).strip(), "%M:%S").time()

        return datetime.strptime(str(self.raw).strip(), "%S").time()
932755
def durationSeconds(self):
        
        f=0.0
        if self.isVideo() or self.isAudio():
            if self.__dict__['duration']:
                try:
                    f=float(self.__dict__['duration'])
                except Exception as e:
                    print "None numeric duration"
        return f
24684
def datetime formatcode
        deminutified = formatcode.downcase.gsub(/(?<hrs>H|h)(?<div>.)m/, '\k<hrs>\k<div>i')
                         .gsub(/im/, 'ii')
                         .gsub(/m(?<div>.)(?<secs>s)/, 'i\k<div>\k<secs>')
                         .gsub(/mi/, 'ii')
        return deminutified.gsub(/[yMmDdHhSsi]*/, Dtmap)
      end
187157
private PlainTime getTimeUTC() {

        int timeOfDay = getTimeOfDay(this);
        int minutes = timeOfDay / 60;
        int hour = minutes / 60;
        int minute = minutes % 60;
        int second = timeOfDay % 60;
        int nano = this.getNanosecond();

        return PlainTime.of(hour, minute, second, nano);

    }
767561
def mtime(self, fpath=None):
        
        return dtformat(
            datetime.datetime.utcfromtimestamp(
                os.path.getmtime(fpath or self.fpath)))
783216
def to_timedelta(value):
    """"""
    if value is None:
        return None
    if isinstance(value, (six.integer_types, float)):
        return timedelta(microseconds=(float(value) / 10))
    match = _TIMESPAN_PATTERN.match(value)
    if match:
        if match.group(1) == "-":
            factor = -1
        else:
            factor = 1
        return factor * timedelta(
            days=int(match.group("d") or 0),
            hours=int(match.group("h")),
            minutes=int(match.group("m")),
            seconds=float(match.group("s")),
        )
    else:
        raise ValueError("Timespan value '{}' cannot be decoded".format(value))
1101472
def formatTimeOfDay(milliseconds, format = "%I:%M %p" )
      format ||= "%I:%M %p"
      timeOfDay = ""
      timeOfDay = Time.at(milliseconds.to_i/1000).utc.strftime(format) if milliseconds
   end
88807
function(microseconds) {
        var milliseconds = microseconds / 1000;
        if (moment.utc(milliseconds).format("HH") > 0) {
            return moment.utc(milliseconds).format("HH:mm:ss.SSS");
        }
        return moment.utc(milliseconds).format("mm:ss.SSS");
    }
343474
def readable_time_delta(seconds):
    
    days = seconds // 86400
    seconds -= days * 86400
    hours = seconds // 3600
    seconds -= hours * 3600
    minutes = seconds // 60

    m_suffix = 's' if minutes != 1 else ''
    h_suffix = 's' if hours != 1 else ''
    d_suffix = 's' if days != 1 else ''

    retval = u'{0} minute{1}'.format(minutes, m_suffix)

    if hours != 0:
        retval = u'{0} hour{1} and {2}'.format(hours, h_suffix, retval)

    if days != 0:
        retval = u'{0} day{1}, {2}'.format(days, d_suffix, retval)

    return retval
112217
def get_time_of_day_description(self):
        
        seconds_expression = self._expression_parts[0]
        minute_expression = self._expression_parts[1]
        hour_expression = self._expression_parts[2]

        description = StringBuilder()

        # handle special cases first
        if any(exp in minute_expression for exp in self._special_characters) is False and \
            any(exp in hour_expression for exp in self._special_characters) is False and \
                any(exp in seconds_expression for exp in self._special_characters) is False:
            # specific time of day (i.e. 10 14)
            description.append(_("At "))
            description.append(
                self.format_time(
                    hour_expression,
                    minute_expression,
                    seconds_expression))
        elif "-" in minute_expression and \
            "," not in minute_expression and \
                any(exp in hour_expression for exp in self._special_characters) is False:
            # minute range in single hour (i.e. 0-10 11)
            minute_parts = minute_expression.split('-')
            description.append(_("Every minute between {0} and {1}").format(
                self.format_time(hour_expression, minute_parts[0]), self.format_time(hour_expression, minute_parts[1])))
        elif "," in hour_expression and "-" not in hour_expression and \
                any(exp in minute_expression for exp in self._special_characters) is False:
            # hours list with single minute (o.e. 30 6,14,16)
            hour_parts = hour_expression.split(',')
            description.append(_("At"))
            for i, hour_part in enumerate(hour_parts):
                description.append(" ")
                description.append(
                    self.format_time(hour_part, minute_expression))

                if i < (len(hour_parts) - 2):
                    description.append(",")

                if i == len(hour_parts) - 2:
                    description.append(_(" and"))
        else:
            # default time description
            seconds_description = self.get_seconds_description()
            minutes_description = self.get_minutes_description()
            hours_description = self.get_hours_description()

            description.append(seconds_description)

            if description:
                description.append(", ")

            description.append(minutes_description)

            if description:
                description.append(", ")

            description.append(hours_description)
        return str(description)
1319638
def encode(timestamp):
    
    seconds = int(timestamp)
    nanoseconds = int((timestamp - seconds) * 1000000000)
    seconds = seconds + _OFFSET
    encoded = b2a_hex(struct.pack(_STRUCTURE, seconds, nanoseconds))
    return "@" + encoded.decode("ascii")
454041
private String formatTime(final long elapsedTicks) {
		String formattedTime = "";
		// should be hh:mm:ss.SSS, but 00 starts with 01
		SimpleDateFormat formatter = new SimpleDateFormat("00:mm:ss.SSS");
		Calendar calendar = Calendar.getInstance();

		if (elapsedTicks <= 9999) {
			calendar.setTimeInMillis(0);
			formattedTime = formatter.format(calendar.getTime()) + String.valueOf(String.format("%04d", elapsedTicks));
		} else {
			calendar.setTimeInMillis(elapsedTicks * nsPerTick / nsPerMs);
			String formattedTicks = String.format("%07d", elapsedTicks);
			formattedTicks = formattedTicks.substring(formattedTicks.length() - 4);
			formattedTime = formatter.format(calendar.getTime()) + formattedTicks;
		}
		return formattedTime;
	}