I have a chat on my iOS and Android application, and I was using the local timestamp in the message.
I know this is a huge mistake...
I would like to use Firebase timestamp.
On iOS I was using NSDate().timeIntervalSince1970
, which is in second.
But FirebaseServerValue.timestamp()
is in millisecond, so obviously it doesn't work really well.
- Do you know if there is a way to say to Firebase to store the timestamp in second rather than millisecond?
- Otherwise, do you have a solution for me?
I can update the application with Firebase's timestamp, and send a message when an old version is opened, but I know that not everyone will update the application.
Thanks!