Fix date computation.