Reputation: 2503
Does firestore have this feature where it will create a timestamp field with their own time when creating a new document... So it wont matter where ever the document has been created from, the time zone will be same for every country because i believe firebase has one time.
Upvotes: 3
Views: 809
Reputation: 599571
I think you're looking for Firestore's server timestamp. When you write a field with that value into a document, the Firestore server will expand it to the current time on the server.
If you want to prevent users from writing other values to this field, you can use Firebase's server-side security rules to enforce that the value of the field is equal to the request.time
built in variable.
Upvotes: 1