Fix diff time logic