Fix the calculation of time stamp. We had an error when any field
had a 9.