Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Using Firebase clock to timestamp changes

Tags:

firebase

We have a dataset in Firebase updated by multiple clients. We want to track the last modified on datetime of the dataset. We cannot rely on the client setting the modified on datetime as their local clock can be totally out of sync.

Is there a way I could have Firebase tag timestamp to a dataset based on its clock to track last modified on?

like image 389
Kartik Avatar asked Oct 23 '12 18:10

Kartik


1 Answers

We're working on some features to support this at the moment, but we don't have a way to do this right now. Note, however, that the IDs created by "push()" are chronologically-ordered, and we compensate for client-side clock skew as best we can when we create them, so if all you're trying to do is make sure some writes to a list occur in order, you can do that with push().

I'd be interested in hearing how you'd like this feature to look. If you have a sec I'd appreciate an email to andrew at firebase...

Update: Firebase now supports setting server timestamps as well as accessing the server time directly on the client. See the documentation here: https://www.firebase.com/docs/managing-presence.html

like image 149
Andrew Lee Avatar answered Sep 18 '22 13:09

Andrew Lee