Date question

I’ve have been tinkering with Ai and trying to use it to help me learn some coding and have used it to help create a couple apps. One Is a date based app. Is there a way to change the date on a hub manually, and not get the date or time from the net? I would like to try this out now, not have to wait until November to see if it actually works,. Thanks!

Yes (ignore the fact that the time happens to come from a server in this example; the crux of the issue is the method that sets it to whatever value you provide):

That being said, for your particular case, you'd probably also need to disable NTP (not sure if that's possible) or maybe just temporarily set it to an invalid server, otherwise it will set itself to the correct time eventually:

1 Like

That is where I’m getting hung up. Unless im missing somet, the only option i see is to update from browser.

From the thread @bertabcd1234 pointed you to, this is the line that does the update: :

You can set epochTime in the example to any valid value that you like and execute it. As he also mentioned you can disable the NTP server by sending the endpoint:
http://<HubIpAddr>/hub/advanced/ntpServer/<ipAddr>
an invalid server address.

4 Likes

Ahh, thank you! I’ll give it a look, I haven’t had a chance to yet.