[Bug] 'Update a Campaign' (update-campaign) - Date/time format management if on o'clock time
Hello,
I found a surprising behavior on this endpoint:
-
If I replace the end date with "2024-06-13T00:00:00.000Z" (json = {'op': 'replace', 'path': '/deadline', 'value': '2024-06-13T00:00:00.000Z'}), the api saves the data like this: "2024-06-13T00:00Z"
-
However, if I replace it with "2024-06-13T00:00:00.001Z", the data is stored in this format.
This causes me problems when I read the data from v3/campaigns/:id, as the format is not always the same (requiring additional controls).
I don't know whether it's the data format that's wrong when saving (update) or when reading (get-campaign).
Have a good day, Thomas
It's also possible to update deadline with this format :
Which one is the good one ?
This issue arises when dates are created or updated without including seconds or milliseconds, causing them to be trimmed. However, if seconds or milliseconds are later added during an update, the format changes, leading to inconsistencies, and vice versa.