Here is the simplest example possible:
var fb = new Firebase(\'https://xxxxxxxxxxx.firebaseio.com/test\');
fb.limitToLast(1).on(\'child_added\', function(sn
For the Realtime SDK this is the expected behavior. Eventually, the timestamp will reflect the proper server value. But, if this does not suit your needs you can use the REST API.
function addTimestamp() {
fetch('https://.firebaseio.com/test/.json', {
method: 'post',
headers: {
'Accept': 'application/json',
'Content-Type': 'application/json'
},
body: JSON.stringify({
'.sv': 'timestamp' // add a timestamp
})
});
}
This will not use the local timestamp, and in combination with the Realtime SDK, each client will have the same timestamp on the first update.