dalenguyen / firestore-import-export

An application that can help you to backup and restore from Cloud Firestore | Firebase
https://www.npmjs.com/package/firestore-export-import
401 stars 109 forks source link

Dates are not supported #6

Closed uknowmeright closed 6 years ago

uknowmeright commented 6 years ago

Everything worked correctly for me except the export of dates. They seem to be imported back into the database as a string.

ex: 2018-05-31T04:00:00.000Z

Any advice on getting around this?

Thanks,

dalenguyen commented 6 years ago

Hi @uknowmeright , in this case, I think that you can loop through the array and convert the string to date by using a helper like the moment package or new Date() in JavaScript, then write data to firestore. You can use Firebase function helper to do it.