I'm trying to get the server time from the firebase with the following code:
let timestamp = ServerValue.timestamp()
let today = NSDate(timeIntervalSince1970: timestamp/1000)
But this gives me an error saying:
Binary operator '/' cannot be applied to operands of type '[Any Hashable: Any]' and 'Int'
Why ServerValue.timestamp()
dosen't return a TimeIntervel value?
How can I get the server's local time?