Fix timestamp validation

Bug: 61058
Change-Id: Icc19da3626a090bed04eb9773c748e90223ab3f4
(cherry picked from commit c49abce7a2f4b1f79f900e90e90c887506a81433)