add +1 hour to datetime.time() django on forloop
I found the solution now, and this is work.


    overtime_all = 5
    overtime_total_hours = 0
    out = datetime.time(14, 30)

    while overtime_all > 0:
        overtime200 = object.filter(time__range=(out,datetime.time(out.hour+1, 30))).count()
        overtime_total_hours = overtime_total_hours + overtime200
        overtime_all -=1

    print overtime_total_hours

i do change out.hour+1 to datetime.time(out.hour+1, 30) its work fine now, but i dont know maybe there more compact/best solution.
thank you guys for your answer.
I have code like this, I want to check in the time range that has overtime and sum it.
currently, am trying out.hour+1 with this code, but didn't work.


    overtime_all = 5
    overtime_total_hours = 0
    out = datetime.time(14, 30)

    while overtime_all > 0:
        overtime200 = object.filter(time__range=(out, out.hour+1)).count()
        overtime_total_hours = overtime_total_hours + overtime200
        overtime_all -=1

    print overtime_total_hours


how to add 1 hour every loop?...