Complete add_time_edit() function