I'm working with the Amazon API. I need to convert local time (EDT) to a DateTime that complies with the following documentation from Amazon:
You can specify the FulfillmentDate with or without time zone information: 2006-12-11T09:50:00 - local time zome applies 2006-12-11T09:50:00+02:00 - GMT time zone applies For locales affected by Daylight Saving Time, adjust the information, if necessary. Daylight Saving Time is not automatically taken into consideration.
I thought I needed to do something like shown in this SO thread, but apparently wrong, because when I upload the date using that method, Amazon shows it as a day before. I can confirm this by using this online converter tool.
For example:
My local time is "7/25/2012 00:00:00" (EDT).
Using above SO method, and formatted, it's now "2012-07-25T01:00:00-04:00".
But it converts to the 24th, specifically "Tuesday, July 24, 2012 at 21:00:00".
Obviously I'm doing something wrong here - I'd appreciate if someone can enlighten me.
Thank you!