import datetime def seconds_to_time_object(seconds): return datetime.datetime.fromtimestamp(seconds).time()
from datetime import datetime t = datetime.now().time() seconds = (t.hour * 60 + t.minute) * 60 + t.second