We present splitting methods for numerically solving a certain class of explicitly time-dependent linear differential equations. Starting from an efficient method for the autonomous case and making use of the formal solution obtained with the Magnus expansion, we show how to get the order conditions for the non-autonomous case. We also build a family of sixth-order integrators whose performance is clearly superior to previous splitting methods on several numerical examples. 1 Instituto de Matem´atica Multidisciplinar, Universidad Polit´ecnica de Valencia, E-46022 Valencia, Spain. 2 Departament de Matem`atiques, Universitat Jaume I, E-12071 Castell´on, Spain. 3 Konputazio Zientziak eta A.A. saila, Informatika Fakultatea, EHU/UPV, Donostia/San Sebasti´an, Spain.