complete code for the time change