Hi
How can i get the time from an ntp server for united kingdom
with corona
how can i display this time on screen with a simple print statement
thankyou
Hi
How can i get the time from an ntp server for united kingdom
with corona
how can i display this time on screen with a simple print statement
thankyou
You need to find an NTP service that offers a REST API. This page lists several:
Then you can use Corona’s network.request() API to call the necessary URL from the NTP server, it will likely return you a JSON object in the event.response value in the network.request() handler function… Then you can then use our json.decode() API to turn the JSON object into a Lua table and then access the time.
Rob
You need to find an NTP service that offers a REST API. This page lists several:
Then you can use Corona’s network.request() API to call the necessary URL from the NTP server, it will likely return you a JSON object in the event.response value in the network.request() handler function… Then you can then use our json.decode() API to turn the JSON object into a Lua table and then access the time.
Rob