When using the REST API to (successfully) create a Confluence database, the returned createdAt date is returned as number like so:
"createdAt": 1727122655397
The documentation claims that the data type should be string and have date-time format, like so:
"createdAt": "2024-09-23T20:17:35.607Z"
That number is the "epoch" time that relates to "Monday, September 23, 2024 8:17:35.397 PM"
It's easily converted, but that's not the point. I agree that the value isn't what is documented, and one or the other should be updated. I would report the behavior as a bug to support.
In the meantime, Epoch time is ubiquitous and whatever programming language you're using can certainly convert it. In Python, the datetime library can do it with the fromtimestamp() method.
@Jim Knepley - ReleaseTEAM I agree that the number timestamp is fine as well, if not better. In my case a JSON to domain object converter got confused because so far, and according to the docs, it expected a date-time string. This can be changed for sure.
But dates being represented by different types in the same data structure? Because the createdAt in the history property is still returned as string. This just doesn't feel right and looks like an oversight.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.