Is there any API call to retrieve server's current date and time? I couldn't find something in the docs.
Thanks,
Best Answer
M
Marcel Piestansky
said
almost 7 years ago
Hi Paul,
When you create a JavaScript Date object in the CloudCode it is initialized with the current time and date. To access it from the client, you could create a custom event and add the time/date information to the response.
When you create a JavaScript Date object in the CloudCode it is initialized with the current time and date. To access it from the client, you could create a custom event and add the time/date information to the response.
Best,
Marcel
P
Paul Delia
said
almost 7 years ago
Thanks a lot Marcel!
D
Deftouch Design
said
over 6 years ago
"When you create a JavaScript Date object in the CloudCode it is initialized with the current time and date. To access it from the client, you could create a custom event and add the time/date information to the response."
Can you please help me with the detailed steps that I need to follow?
I tried obtaining the date from a NTP server but that is not working 100% of the times.
Paul Delia
Is there any API call to retrieve server's current date and time? I couldn't find something in the docs.
Thanks,
Hi Paul,
When you create a JavaScript Date object in the CloudCode it is initialized with the current time and date. To access it from the client, you could create a custom event and add the time/date information to the response.
Best,
Marcel
- Oldest First
- Popular
- Newest First
Sorted by Oldest FirstMarcel Piestansky
Hi Paul,
When you create a JavaScript Date object in the CloudCode it is initialized with the current time and date. To access it from the client, you could create a custom event and add the time/date information to the response.
Best,
Marcel
Paul Delia
Thanks a lot Marcel!
Deftouch Design
"When you create a JavaScript Date object in the CloudCode it is initialized with the current time and date. To access it from the client, you could create a custom event and add the time/date information to the response."
Can you please help me with the detailed steps that I need to follow?
I tried obtaining the date from a NTP server but that is not working 100% of the times.
Customer Support
You can create a JS date using...
var dateNow - new Date();
-
Documentation Notes
-
Design issues with user events
-
Using NoSQL
-
Runtime Collections vs Metadata Collections
-
Anonymous authentication from browser app
-
Modules
-
Movement With Unity
-
Problem with url parameters for downloadables
-
Querying NoSql GameSparks database
-
Challenge accesType
See all 2487 topics