How to get server time and record playing duration?

hello guys
i want to know how can i get an server time? i use “Firebase::ServerTimestamp()” i get this answer
Screenshot 2023-01-28 164011
i want to setup playing duration for each user and i don’t want use local storage for prevent cheating

i need guide how to get time from firebase or any server correctly , and then how to do some mathematics on time to calculate total spend time?

thanks in advance

any idea?
dear @Gruk , @arthuro555

Please do not mention random people to get attention, that is bad etiquette and will rub people the wrong way.

Firebase::ServerTimestamp() is not a function to get a timestamp from the server. It’s a special value you can set a Firebase document’s field to, to tell Firebase to replace it with a timestamp from their servers.

1 Like

of course dear arthuro555 ,thank you

is there any way to measure playing time for each user?

Simply use a timer for that (and store it in Firebase if you want to prevent cheating).

1 Like

thank you dear @Gruk