def next_time(t): next_t = list(t) if math.fmod(next_t[3], 2) == 0: next_t[3] += 2 else: next_t[3] += 1 next_t = next_t[:4] + [0 for i in range(5)] return next_t