question

drallcom3 avatar image
drallcom3 asked

Local client time on Cloudscript?

How do I get a player's local time when using cloudscript?

UTC+x or something similar is good enough.
I want to reset some data if midnight has passed on login, but midnight in Europe is not midnight in the US.

Of course I don't want the client simply tell me the time.

Is it maybe hidden in the cloudscript call already? Do I have to find it out myself by comparing the account's country code with the UTC?

CloudScript
10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

1 Answer

·
jital avatar image
jital answered

Greetings,

You will have to find the client time yourself, but you can get all the Location data you need from the Server.GetPlayerProfile. Such as, country code, city, continent, latitude, and longitude.

1 comment
10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

drallcom3 avatar image drallcom3 commented ·

I was afraid that that it's only possible over the player profile, and then somehow determining the local time myself.

0 Likes 0 ·

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.