Ryzee119/LithiumX

Add SNTP client

amak79 opened this issue · 8 comments

Would you consider adding an SNTP client? My Xbox has the clock capacitor removed and is regularly unplugged, so I have to manually set the date/time when using LithiumX.

Can you try #15?
Artifact binary builds should be here: https://github.com/Ryzee119/LithiumX/actions/runs/3872962495

This pulls time at startup and resyncs the xbox system time. It then updates every 60 minutes thereafter.

Ive also added a clock readout to the system info screen which should offset the timezone and daylight savings time set in MS Dash to display your local time. Let me know if thats correct too.

I gave it a quick test and it appears to work correctly. The daylight savings is offset properly as well.

Will it be possible to override the SNTP server via dash.xml?

I also noticed the date/time is displayed without a label like other system info. Perhaps if you add "Date/Time:" or "Date and Time:" it will give it a more consistent look.

Thanks for testing.
Yea the plan is to allow the server IP to be configurable.

I'll add the date/time heading too ☺️

Will it just be a server IP? Or will be able to support a host name too (assuming a service like NTP pool also supports SNTP) c:

I think it should work with DNS lookup but I haven't tested it.

EDIT: Looks like I need to set SNTP_SERVER_DNS to enable this feature.

Looks like this now
image

Also sntp server can now use DNS lookup and is currently hardcoded to "pool.ntp.org". I will make this configurable in the future but its a bit more work.

If you could try again and if ok ill merge. Latest build artifact: https://github.com/Ryzee119/LithiumX/actions/runs/3880965778

I did another quick test and it's working fine. It looks really nice with the header 😀

Thank you very much.

Merged into master