On amazon’s documentation for post uploads to S3 it tells me that I need to format the date for the expiration key in the policy document like this:
The expiration specifies the expiration date of the policy in ISO8601
GMT date format.
For example, “2007-12-01T12:00:00.000Z” specifies that the policy is not valid after
12:00 GMT on 2007-12-01. Expiration is required in a policy.
and I can’t seem to figure out how to get joda-time to print print the date in the
correct format.
However I can’t seem to get it to print in GMT without the -4:00 or whatever for the local time zone.
I tried using the custom formatter with no luck, can anyone give me a hint here?
You need to use the
LocalDateandLocalDateTimerepresentations. Check it out:will print something like: