We propose a time-exact Krylov-subspace-based method for solving linear ordinary differential equation systems of the form y ′ = − Ay + g(t) and y ′ ′ = − Ay + g(t), where y(t) is the unknown function. The method consists of two stages. The first stage is an accurate piecewise polynomial approximation of the source term g(t), constructed with the help of the truncated singular value decomposition. The second stage is a special residual-based block Krylov subspace method. The accuracy of the method is only restricted by the accuracy of the piecewise polynomial approximation and by the error of the block Krylov process. Because both errors can, in principle, be made arbitrarily small, this yields, at some costs, a time-exact method. Numerical experiments are presented to demonstrate efficiency of the proposed method. Copyright © 2013 John Wiley & Sons, Ltd.