Date Format varies
- Dominant language
- Java
- Stars
- 593
- Forks
- 123
- Avg merge
- 2d 18h
- Merged PRs (30d)
- 4
Description
## Gentics Mesh Version, operating system, or hardware.
- v0.40.3
## Problem
When loading a Nodes Date-Field via GraphQL, Search or loading it via UUID/Path, the Format of the Date varies.
Sometimes it's using the ISO-8601 Format, sometimes the extended one with Milliseconds:
* `Y-m-d\TH:i:sZ` (php), `yyyy-MM-dd'T'HH:mm:ssZ` (java)
* `Y-m-d\TH:i:s.uP` (php), `yyyy-MM-dd'T'HH:mm:ss.SSSZ` (java)
```
{
"uuid": "802574b6d5924efca574b6d5922efcff",
"version": "9.0",
"fields": {
"date": "2019-10-03T00:30:37Z"
}
},
{
"uuid": "737e0bcbb6424264be0bcbb6429264cf",
"version": "9.0",
"fields": {
"date": "2019-10-03T00:30:52Z"
}
},
{
"uuid": "d1fd44dab2674da1bd44dab267eda1bd",
"version": "10.0",
"fields": {
"date": "2019-10-08T14:55:57.761Z"
}
},
{
"uuid": "32e688126931475aa688126931b75a9f",
"version": "9.0",
"fields": {
"date": "2019-10-08T14:55:40.818Z"
}
},
{
"uuid": "9cbbceb861e74fa4bbceb861e78fa497",
"version": "9.0",
"fields": {
"date": "2019-10-03T00:30:45Z"
}
},
```
This is usually not too big of an issue with most languages, but PHP can only always parse a Date with one format which is a little troublesome to figure out.
## Reproducer
* Create a Schema with a Date Field
* Create couple of Nodes of that Schema, sometimes with and without ms
* Load the Nodes via GraphQL
## Expected behaviour and actual behaviour
The Format should always be the same
Contributor guide
Assessment
This issue has not been assessed yet.