change start and end time to time