0

Here is a Screenshot of written document.

What am I missing here ?

Code looks something like:

localDocument['a3'] = {".sv": "timestamp"};

where a3 is supposed to be server timestamp field in this document.

ARK4579
  • 663
  • 2
  • 6
  • 16
  • Refer to the [link1](https://stackoverflow.com/questions/50907151/flutter-firestore-server-side-timestamp) and [link2](https://stackoverflow.com/questions/40214593/firebase-database-servervalue-timestamp-return-an-object). – Akshansha Singhal Oct 06 '21 at 10:00
  • `{".sv": "timestamp"}` is the sentinel value for Realtime Database. I'm pretty sure Firestore uses another sentinel. Any reasons you can't use `FieldValue.serverTimestamp()` as shown here: https://firebase.google.com/docs/firestore/manage-data/add-data#server_timestamp? – Frank van Puffelen Oct 06 '21 at 14:37

0 Answers0