Improve timestamp decoding.