API for time edit