Fix normalisation of timestamp to avoid overflow