[COMPASS-3880] Export Collection not working properly for date fields Created: 05/Sep/19  Updated: 27/Feb/23  Resolved: 06/Sep/19

Status: Closed
Project: Compass
Component/s: Import/Export
Affects Version/s: None
Fix Version/s: None

Type: Bug Priority: Major - P3
Reporter: Manivannan Ponnusamy Assignee: Unassigned
Resolution: Won't Fix Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Tested
tested by COMPASS-3824 Test behavior of new feature in relat... Closed

 Description   

When I am exporting a collection from compass in JSON format the fileds are exported as shown below

 
    "last_scraped": {
        "$date": 

{             "$numberLong": "1550466000000"         }

    }
 
This is causing System.FormatException in c# driver whan I am trying to convert this to a BSON object using BsonDocument.Parse() method.
 
But if I use mongoexport tool to export a collection the date fields are exported as shown below 
 
    "last_scraped": 

{         "$date": "2019-02-16T05:00:00Z"     }

 
The above is perfectly working fine with the BsonDocument.Parse() method.
 
Please update the compass import/export functionality.
 
 



 Comments   
Comment by David Becker [ 27/Feb/23 ]

I just noticed this discrepancy as well, and much prefer the mongoexport format where it shows the date as a string. I see the export functionality is being reworked, has that been completed yet? If so, the issue still exists. If not, is there a parent ticket I can watch to know when it is?

Comment by Massimiliano Marcon [ 06/Sep/19 ]

Hi pmanivannan89@gmail.com, thank you for the bug report.

We are currently rewriting the export/import functionality of Compass. I am adding this bug to the list of things we need to test for once the new implementation is in place.

Generated at Wed Feb 07 22:34:32 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.