Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Incompatible ISO-8601 in REST? #140

Closed
ndevenish opened this issue Sep 28, 2013 · 2 comments
Closed

Incompatible ISO-8601 in REST? #140

ndevenish opened this issue Sep 28, 2013 · 2 comments

Comments

@ndevenish
Copy link

The 5.13 user guide says:

Parameter representing a date value. Use the ISO-8601 date-format (see ISO-8601 on wikipedia) using both time and date-components (eg. 2013-04-03T23:45Z).

However, the response I am getting back from GET repository/deployments is (excess trimmed):

{
  "data": [ {"deploymentTime": "2013-09-28T15:35:11UTC", } ],
}

but UTC does not seem to be a valid 8601 designator - it should be "Z" for UTC. I'm no java expert, but it looks like this might be caused by RequestUtil.java:28:

private static final SimpleDateFormat longDateFormat
  = new SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ssz");

Per the java docs, should this last designator be Z?

@frederikheremans
Copy link
Contributor

Seems that that particular entity (DeploymentResponse) is one of the entities that is taken and reused from the legacy-REST api, which did date-serialisation "manually" instead of relying on jackson to create the date-responses.

Valid issue indeed.

@tijsrademakers
Copy link
Contributor

Fixed it to use the default ISO date serialization.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants