I'm using Firebase Functions as my server for my app and my functions retrieve some data from my Firestore database and return it to the user. The date variables of objects from the database are always formatted as a string with the format:
"yyyy-MM-dd'T'HH:mm:ss.SSSZZZ"
However, when I retrieve the same objects using the SDK, the dates are now returned as a Firebase Timestamp
e.g:
FIRTimestamp: seconds=1520380800 nanoseconds=0>
How can I make the node.js
Function code return the dates as a Firebase Timestamp
as well?