How should i compare Firebase Timestamp with local device time.
let serverTIme = FIRServerValue.timestamp()
let localtime = Date()
let dbRef = FirebaseServerReference()
here is full code https://pastebin.com/4drtSZA6
Edit:
When i set timestamp in Firebase RealtimeDatabase using FIRServerValue.timestamp
it suppose to save timestamp of Server not the my device time.
In my case, it looks like it is depending on my device time. i want to check that if there is a ‘Time Difference’ in server time & my device time.
So i think that this question might not possible duplicate of Trying to convert Firebase timestamp to NSDate in Swift.