in translate_captions/captions_helper.py [0:0]
def formatTimeSRT(self, timeSeconds):
ONE_HOUR = 60 * 60
ONE_MINUTE = 60
hours = math.floor(timeSeconds / ONE_HOUR)
remainder = timeSeconds - (hours * ONE_HOUR)
minutes = math.floor(remainder / 60)
remainder = remainder - (minutes * ONE_MINUTE)
seconds = math.floor(remainder)
remainder = remainder - seconds
millis = remainder
return str(hours).zfill(2) + ':' + str(minutes).zfill(2) + ':' + str(seconds).zfill(2) + ',' + str(math.floor(millis * 1000)).zfill(3)