The development of numerical methods for finding optimal solutions of control problems modeled by differential-algebraic equations (DAEs) is an important task. Usually restrictions are placed on the DAE such as being semi-explicit. Here the numerical solution of optimal control problems with linear time-varying DAEs as the process and quadratic cost functionals is considered. The leading coefficient is allowed to be time-varying and the DAE may be higher index. Both a direct transcription approach and solution of the necessary conditions are examined for two important discretizations.