Convert time format in policy to string using iso8601 in policy

- Modified the format of expiration time used in creating the policy. 

Some applications like ours have our own implementation of Time.now.to_json. This results in an invalid policy, when Time.now is directly converted to json. 

- Modified it to first convert to string using iso8601 format, before converting it to json.