fix discrete time conversion