How to use internet time NTP in Godot?

:information_source: Attention Topic was automatically imported from the old Question2Answer platform.
:bust_in_silhouette: Asked By rizalma

Hi, Is there a example how to use network time protocol NTP to get current time/millis based on user timezone?

thank you

:bust_in_silhouette: Reply From: combatvolcano
var time = OS.get_datetime()
var dayofweek = time["weekday"]
print(str(dayofweek))

originally answered here
https://forum.godotengine.org/9444/how-to-get-day-from-datetime

It seems that if you need more than OS offers you would have to extend python and the MS is probably not going to work. Definitely possible to write a module that uses the internal frame clock along with OS datetime module to track the actual time down to MS.

What are you trying to do?