t1 = datetime.time(12, 10, 0, tzinfo=GMT1()) # 12:10
t2 = datetime.time(13, 13, 0, tzinfo=GMT1()) #13:13
t3 = datetime.time(23, 55, 0, tzinfo=GMT1()) #23:55
t4 = datetime.time(01, 10, 0, tzinfo=GMT1()) #01:10
I need the minute interval between between two times. For instance a non working one:
def minute_interval(start,end):
return end - start
minute_interval(t1,t2) #should give 63 mins.
Also if the end time is smaller than start, it should do the calculation by understaing the end is from the next days time. ie:
minute_interval(t3,t4) #should give 75 mins.
How can this be achieved ? I need to rewrite the minute_interval function for this aim.