Environmental studies are commonly carried out through numerical simulations, which have to be accurate, reliable and efficient. When transient problems are considered, the validity of the solutions requires the calculation and management of the temporal discretization errors. This article describes an adaptive time stepping strategy based on the estimation of the local truncation error via the Richardson extrapolation technique. The time-marching scheme is mathematically based on this a posteriori error estimation that has to be gauged. General optimizations are also suggested making the control of both the temporal error and the evolution of the time step size very efficient. Furthermore, the algorithm connecting these methods is all the more interesting as it could be implemented in many computational codes using different numerical schemes. In the hydrogeochemical domain, this algorithm represents an interesting alternative to a fixed time step as shown by the various numerical tests involving reactive transport and unsaturated flow.