We propose and analyze a second-order partitioned time-stepping method for a two-phase flow problem in porous media. The algorithm is a refactorization of Cauchy's one-leg theta-method: the implicit backward Euler method on [t(n),t(n+theta)], and a linear extrapolation on [t(n+theta),t(n+1)]. In the backward Euler step, the decoupled equations are solved iteratively, with the iterations converging linearly. In the absence of the chain rule for time-discrete setting, we approximate the change in the free energy by the product of a second-order accurate discrete gradient (chemical potential) and the one-step increment of the state variables. Similar to the continuous case, we also prove a discrete Helmholtz free energy balance equation, without numerical dissipation. In the numerical tests we compare this symplectic implicit midpoint method (theta = 1/2) with the classic backward Euler method, and two implicit-explicit time-lagging schemes. The midpoint method outperforms the other schemes in terms of rates of convergence, long-time behavior and energy approximation, for both small and large values of the time step.