I'm trying to add time. eventually I will create a function passing different times and I want to change the time. For some reason I can't make timedelta to do it.
this is my code:
time1 = datetime.time(9,0)
timedelta = datetime.timedelta(minutes=15)
time2 = time1 + timedelta
error:
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
TypeError: unsupported operand type(s) for +: 'datetime.time' and 'datetime.timedelta'
what should i change?
datetime.datetimeobject in order to add a timedelta