Closed Bug 905740 Opened 11 years ago Closed 11 years ago

WebService returning invalide dateTime format

Categories

(Bugzilla :: WebService, defect)

defect
Not set
normal

Tracking

()

RESOLVED WORKSFORME

People

(Reporter: Frank, Unassigned)

Details

User Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_8_4) AppleWebKit/536.30.1 (KHTML, like Gecko) Version/6.0.5 Safari/536.30.1

Steps to reproduce:

1) use the new REST API with .../bugzilla-trunk/rest.cgi/bug?id=1&username=XXX&password=YYY
look for the field creation_time.


Actual results:

In my case I get  "2013-08-08T19:12:00Z".


Expected results:

I think the correct value should be  "2013-08-08T19:12:00-0000".
Per http://msdn.microsoft.com/en-us/library/windowsazure/dd894027.aspx, this is the correct format.
Status: UNCONFIRMED → RESOLVED
Closed: 11 years ago
Resolution: --- → WORKSFORME
But per http://docs.oracle.com/javase/7/docs/api/java/text/SimpleDateFormat.html#rfc822timezone there is now way to get this parsed correctly when not in the UTC timezone.

You must code simpleFormatter.parse(replace("Z", " UTC")) to get the correct value. If we have 

"2013-08-08T19:12:00 UTC" or "2013-08-08T19:12:00 +0000" we can pass the string without the replace
You need to log in before you can comment on or make changes to this bug.