Unify the date format in API call
Summary
When making an API call and using date as parameters, the format required is not the same that the format of date in returned objects
Steps to reproduce
curl -X 'GET' \
'http://localhost:8080/api/maintenance?start_after=2022-07-01&end_before=2022-07-31'
What is the current bug behavior?
- The date in the returned data has the format
DD/MM/YYYY HH:MM
- The date in the query has the format
YYYY-MM-DDTHH:MM:SSZ
What is the expected correct behavior?
- The date in the returned data has the format
DD/MM/YYYY HH:MM
- The date in the query has the format
DD/MM/YYYY HH:MM
Relevant logs and/or screenshots
Exemple of returned data
{
"items": [
{
"creation_date": "13/07/2022 10:17",
"description": "XXXXXXXXXXXXXXXXXXXXX",
"end_date": "28/07/2022 18:46",
"events": [],
"external_link": "",
"external_reference": "",
"id": 28,
"links": {
"calendar": "http://localhost:8080/api/maintenance/28/calendar",
"scope": "http://localhost:8080/api/scope/2",
"self": "http://localhost:8080/api/maintenance/28",
"service": "http://localhost:8080/api/service/1"
},
"name": "XXXXXXXXXXXXXXXXXXXX",
"scheduled_end_date": "28/07/2022 21:00",
"scheduled_start_date": "28/07/2022 18:00",
"scope": 2,
"service": 1,
"service_status": "down",
"start_date": "28/07/2022 18:02",
"status": "succeed"
}
]
}
Environment info
0.13.0
Notes
The date format on regular HTML pages, mail notification or calendar data should remains DD/MM/YYYY HH:MM