Fix curTimestamp generation