Date issue in objects/json data

Hi,

A have a json text data exchange between a v15 db and a v17 db (R6). The v15 db puts a date in an object which is then stringified. This string is passed to the v17 db which parses it into an object. Finally the date is extracted using OB get.
This date is 1 day off because v15 is using ISO notation (like {“date”:“2019-09-10T22:00:00.000Z”}) but the v17 doesn’t. Because ‘use date type instead of ISO date format in objects’ is checked (for other reasons).

Shouldn’t 4D handle the ISO date format in JSON Parse independently of that compatibility setting?

So: {“date”:“2019-09-10”} -> 2019-09-10
but: {“date”:“2019-09-10T22:00:00.000Z”} -> 2019-09-11

Koen

Yes. You should use “Used date type instead of ISO date format in objects” compatibility option. I think there is also a database setting that could manage this.

Dates inside objects (85)

https://doc.4d.com/4Dv17/4D/17.3/SET-DATABASE-PARAMETER.301-4621266.en.html

it might be useful to know, that for an entity object,
date attributes are always date,
regardless of the current compatibility setting,
because a dataClass has a schema that defines attribute kind as date.