Giter Site home page Giter Site logo

A few issues and requests about sntp HOT 12 CLOSED

yoyoma2 avatar yoyoma2 commented on September 6, 2024
A few issues and requests

from sntp.

Comments (12)

ErikAndren avatar ErikAndren commented on September 6, 2024 1

Thank you for your comment.
This project was meant as a proof of concept but I will see if I can implement your suggestions.

Thanks,
Erik

from sntp.

yoyoma2 avatar yoyoma2 commented on September 6, 2024

I'll test any new version you come up with.

I wonder if parsing the "Current Offset:" from a page like:

https://www.timeanddate.com/time/zone/sweden/stockholm

with the user specifying the city eg. "sweden/stockholm" in a file could solve the timezone/DST problem and avoid the user interaction completely.

from sntp.

ErikAndren avatar ErikAndren commented on September 6, 2024

There are api:s available for extracting your time zone based on your ip but I felt at the time that the complexity outweighed the benefit. Maybe it is time to revisit that topic

from sntp.

yoyoma2 avatar yoyoma2 commented on September 6, 2024

The Wii clock drifts quite badly so thanks for this tool!

Daylight saving/summer time can get bizarre in some locations (e.g. Saskatchewan). "During the summer, clocks in the entire province match those of Calgary and Edmonton. During the winter, clocks in most of the province outside Lloydminster match those of Winnipeg"

Regina
East Lloydminster
Calgary
Winnipeg

Would the IP address based timezone get the UTC offset right? What about VPN (in the router so even the Wii gets VPN) or what about satellite internet. If I could put "canada/regina" in a timezone.cfg file once, I wouldn't need gamecube controller support at all. Don't know if scraping a website is even possible in a homebrew app.

from sntp.

yoyoma2 avatar yoyoma2 commented on September 6, 2024

Just tried this free API with the URL below (my API key removed)

http://api.timezonedb.com/v2.1/get-time-zone?key=MY_API_KEY&format=json&by=zone&zone=America/Regina&fields=gmtOffset

and the gmtOffset is produced correctly in seconds:

{"status":"OK","message":"","gmtOffset":-21600}

Guess you already knew about this API. "YOU must not make more than one request per second to the SERVICE"

from sntp.

ErikAndren avatar ErikAndren commented on September 6, 2024

Cool.
Looks like you can download the data as well.

If I understand you correctly, you have a use case where you:

  1. Configure a region in a config file
  2. Launch the application
  3. Fetches the current time from a time server
  4. Parses the region from the config file
  5. Looks up the gmtOffset and applies it to the current time
  6. Writes the new time to the wii

I'm assuming that step 3 to 6 should be autonomous?

from sntp.

yoyoma2 avatar yoyoma2 commented on September 6, 2024

Your use case above sounds great for when a valid config file is present.

If the config file didn't exist or didn't specify a region, your app could behave exactly as it does today.

The only thing that would make it even greater is if somehow after the time is set in step 6, a followup app e.g. postsntp.dol were launched if present. Since my Wii boots into wiiflow, I would replace wiiflow's boot.dol with sntp's boot.dol and postsntp.dol would actually be wiiflow's dol. The goal being that the wii's time is corrected transparently before people run the menu app of their choice.

Didn't look into the downloading of that free service's data yet but that might involve daylight saving time processing and zoneinfo gets updates occasionally... It would be good though if the free service disappears.

from sntp.

ErikAndren avatar ErikAndren commented on September 6, 2024

Maybe it would make more sense integrating the time synchronization into wiiflow?

from sntp.

yoyoma2 avatar yoyoma2 commented on September 6, 2024

Seems like wiiflow has died and wiiflow lite was created and is still active. If you added sntp into wiiflow lite, I'd certainly migrate to that. If not, then this standalone sntp is my best bet. I know nothing about wii homebrew development.

from sntp.

yoyoma2 avatar yoyoma2 commented on September 6, 2024

Thanks for merging Pull Request #3. I see you even documented the two modes of operation (manual/automatic) in the README.TXT. Nice! You say "Create a tzdb.cfg on the root of the SD card" but on my Wii with homebrew channel it goes in sd:/apps/sntp with all the other files of this utility but I guess it depends on the launcher.

Thanks for creating this cool utility.

Closing this issue.

from sntp.

Walker9998 avatar Walker9998 commented on September 6, 2024

Also had to copy the file in it's app folder for it to work so probably mention that in the instructions?
Was about to create a new issue so the file could be checked if that hadn't worked

from sntp.

ErikAndren avatar ErikAndren commented on September 6, 2024

from sntp.

Related Issues (4)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.