Use ServerValue.TIMESTAMP it return the current timestamp (time since the Unix epoch, in milliseconds) by the Firebase Database servers. check this link
1
solved Firebase Database Real-time clock to learn
 
Use ServerValue.TIMESTAMP it return the current timestamp (time since the Unix epoch, in milliseconds) by the Firebase Database servers. check this link
1
solved Firebase Database Real-time clock to learn