How do i get the time of the player in a html5 build

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

I am trying to get the time on the users device in gdscipt when the html5 page is hosted on a server it shows the time of the server. I am using this to get the time:

var timeDict = OS.get_time()
var hour = timeDict.hour
var minute = timeDict.minute
var second = timeDict.second

Thanks in advance

:bust_in_silhouette: Reply From: exuin

It’s possible to get the client’s date using the JavaScript singleton. I’m not sure if there’s a built in method in GDScript for getting the client’s date though.