Possible Duplicate:
Generate an RFC 3339 timestamp similar to Google Tasks API?
I'm writing a javascript code to parse events from an XML file and insert them into google calendar. I'm facing a problem in converting my regular UTC dates to google calendar DateTime format.
My date appears in this format (UTC):
Mon Apr 02 2013 15:14:33 GMT+0300 (Arab Standard Time)
While the format I want to convert to is (rfc 3999):
2013-1-16T10:00:00.000-07:00
I tried using methods like date.format() or getDateTime() this but it never worked
Any help is greatly appreciated