jloosli / node-firestore-import-export

Firestore data import and export
https://www.npmjs.com/package/node-firestore-import-export
MIT License
392 stars 79 forks source link

Export timestamp [Object] value #47

Closed andreescocard closed 5 years ago

andreescocard commented 5 years ago

Expected behavior

Display the timestamp value: 18 de março de 2019 18:30:00 UTC-3

Actual behavior

Shows like this: end: { datatype: 'timestamp', value: [Object] },

Steps to reproduce the behavior

Export using library a collection with timestamp

Thanks

jloosli commented 5 years ago

Firebase stores timestamps, geopoints, and references as special classes (see https://github.com/jloosli/node-firestore-import-export#special-datatypes), so in order to serialize them into something exportable as JSON, I convert them to objects (see https://github.com/jloosli/node-firestore-import-export#data-format). If you're wanting to view them directly from the exported data, you'll need to take the serialized data and convert it into the format you're wanting.