get hhmmss from seconds python code example
Example 1: last 24 hour python datetime
lastHourDateTime = datetime.datetime.now() - datetime.timedelta(hours = 1)
Example 2: change a decimal to time in datetime python
str(int(math.floor(time))) + ':' + str(int((time%(math.floor(time)))*60)) + ':' + str(int(((time%(math.floor(time)))*60) % math.floor(((time%(math.floor(time)))*60))*60))