I am trying to convert two \"durations\", however I am currently receiving a TypeError due to one being a datetime.timedelta and one being a
TypeError
datetime.timedelta
Here's one solution I've found, though it's not necessarily efficient:
import datetime x = datetime.timedelta(hours=x.hour, minutes=x.minute, seconds=x.second, microseconds=x.microsecond)
Where x is a datetime.time object.
x
datetime.time