Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

A few issues and requests #1

Closed
yoyoma2 opened this issue Jul 17, 2021 · 12 comments
Closed

A few issues and requests #1

yoyoma2 opened this issue Jul 17, 2021 · 12 comments

Comments

@yoyoma2
Copy link
Contributor

yoyoma2 commented Jul 17, 2021

  1. The icon.png doesn't work in the homebrew channel 1.1.2. The size must be 128x48
  2. The meta.xml file still says 1.0.0 even though I downloaded sntp-v1.1.0.zip so hbc displays 1.0.0 in the load screen.
  3. Had to rename sntp.dol to boot.dol for hbc to find it and put it in the menu
  4. Would be great if gamecube controllers were supported. Homebrew channel and wiiflow both support GC controllers so I don't have a wiimote with a good battery (wii boots directly into wiiflow).
  5. Would be great if a nameserver specified in a text file if present could override the default one.
  6. Specifying the hour offset in a file would be nice too but don't know how to solve the daylight savings time issue...

Congrats on a cool utility!

@ErikAndren
Copy link
Owner

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

@yoyoma2
Copy link
Contributor Author

yoyoma2 commented Jul 20, 2021

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.

@ErikAndren
Copy link
Owner

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

@yoyoma2
Copy link
Contributor Author

yoyoma2 commented Jul 21, 2021

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.

@yoyoma2
Copy link
Contributor Author

yoyoma2 commented Jul 21, 2021

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"

@ErikAndren
Copy link
Owner

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?

@yoyoma2
Copy link
Contributor Author

yoyoma2 commented Jul 22, 2021

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.

@ErikAndren
Copy link
Owner

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

@yoyoma2
Copy link
Contributor Author

yoyoma2 commented Jul 23, 2021

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.

@yoyoma2
Copy link
Contributor Author

yoyoma2 commented Apr 9, 2022

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.

@Walker9998
Copy link

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

@ErikAndren
Copy link
Owner

ErikAndren commented Aug 14, 2024 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants