[CDRIVER-2910] Relaxed JSON pads datetime milliseconds with spaces instead of zeroes Created: 03/Jan/19  Updated: 28/Oct/23  Resolved: 03/Jan/19

Status: Closed
Project: C Driver
Component/s: None
Affects Version/s: None
Fix Version/s: 1.14.0

Type: Bug Priority: Major - P3
Reporter: Kevin Albertson Assignee: Kevin Albertson
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified


 Description   

To reproduce:

bson_t test = BSON_INITIALIZER;
bson_append_date_time (&test, "a", -1, 1356351330001);
printf("%s\n", bson_as_relaxed_extended_json (&test, NULL));

Prints:

{ "a" : { "$date" : "2012-12-24T12:15:30.  1Z" } }

Which uses spaces in the millisecond portion instead of zeroes.



 Comments   
Comment by Kevin Albertson [ 03/Jan/19 ]

Forgot to ask to put ticket number in the commit message. Commit:

https://github.com/mongodb/mongo-c-driver/commit/01bbfa83191d82ed12643fdf7a9447f5b1643620

Generated at Wed Feb 07 21:16:41 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.