code: def seconds2time(s):
      
      hour, temp = divmod(s, 3600)
      minute, temp = divmod(temp, 60)
      temp, second = math.modf(temp)
      return datetime.time(hour=int(hour), minute=int(minute), second=int(second),
                           microsecond=int(round(temp * 1e6)))
docs: Inverse of time2seconds().