fix constraint generation to use correct time objects