Added checking for timestamp format