Small improvement to timestamp calculations.