Ensure encoding object is destroyed if it fails for any reason.
Use Time.zone.now
Copy update