use built-in method to generate timestamp