I'm uploading timestamps to Firestore documents from my flutter application as DateTime(2020, 02, 29, 9)
The timestamp gets stored in Firestore as February 29, 2020 at 9:00:00 AM UTC-6
Retrieving the timestamps from the flutter application using document['timestamp'].toDate().hour returns '9' as expected.
The issue occurs when getting this data in a cloud function. snap.timestamp.toDate() returns the date object as Sat Feb 29 2020 03:00:00 GMT+0000 (UTC) not considering the timezone offset.
How can I retrieve the same time as stored in firestore instead of getting it in UTC.