#1 2023-07-20 13:39:29

Bjoern Henke
Member
Registered: 2022-11-22
Posts: 5

Strings not stored as they are if they look like ISO 8601

The TBsonWriter writes strings as a double value if they look like an ISO 8601. When I get them back from the database, I don't get the original string.

Currently, the only option to fix this, seems to be to remove "Iso8601CheckAndDecode(value, valueLen, dt) or" from TBsonWriter.BsonWriteUtf8OrDecode.
The two "MAGIC" conditions should be fine but checking every string for ISO 8601 and forcing them into datetime can change the string unintentionally.

Offline

#2 2023-07-20 15:39:48

ab
Administrator
From: France
Registered: 2010-06-21
Posts: 14,655
Website

Re: Strings not stored as they are if they look like ISO 8601

IIRC, it was needed for back - and - forth JSON conversion with BSON.

It does NOT write those values as double, but as betDateTime BSON content. So you don't loose information.

Offline

Board footer

Powered by FluxBB