Hi,
it seems that the Camunda 8 tasklist’s GraphQL API is not formatting datetimes correctly.
If I retrieve the “creationTime” of the tasklist via the GraphQL API using:
curl -X POST -H "Content-Type: application/json" -H "Authorization: Bearer eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCIsImtpZC....." -d '{"query": "{tasks(query:{}){name creationTime}}"}' https://bru-2.tasklist.camunda.io:443/76f0bca2-b5b7......../graphql
I get a result like:
{
"data" : {
"tasks" : [ {
"name" : "My Task",
"creationTime" : "2022-07-27T12:04:44.942+0000"
} ]
}
}
If I try to parse the “creationTime” using the standard Java API Instant.parse(…) I get a parse error: java.time.format.DateTimeParseException: Text '2022-07-27T12:04:44.942+0000' could not be parsed at index 23
Looking on various resources on the internet it seems that there is a colon missing in the timezone offset, i.e. “+00:00” instead of “+0000”
Is there a reason why tasklist’s GraphQL API is not returning the standard ISO format?
Kind regards
Tobias