You need to use dojo.date.stamp to convert the JavaScript date to an RTC timestamp (which is an ISO 8601 string). You also need to set the milliseconds and zulu options to be true. Try something like this: