Fix generate timestamp