fixed timestamp validity check