Setting Time Zone in MiSTer
- JudgeDrokk
- Posts: 120
- Joined: Mon May 25, 2020 9:45 am
- Has thanked: 93 times
- Been thanked: 21 times
Setting Time Zone in MiSTer
What's the simplest way to change the timezone on MiSTer so it displays the time where I am (UK).
Thanks!
- Captain FPGA
- Top Contributor
- Posts: 373
- Joined: Sun Apr 11, 2021 9:19 pm
- Has thanked: 195 times
- Been thanked: 25 times
Re: Setting Time Zone in MiSTer
MiSTer will obey DHCP supplies timezones if your DHCP server can supply them.JudgeDrokk wrote: ↑Wed Sep 30, 2020 8:06 pm I have a 2nd MiSTer that, unlike my first, doesent have an RTC but instead grabs the time from the 'net but it's always one hour out.
What's the simplest way to change the timezone on MiSTer so it displays the time where I am (UK).
Thanks!
DHCP options 100 and 101 are the ones you need to modify. Generally speaking setting your DHCP server (for most people at home, their Internet router) to the correct time zone will do it.
Re: Setting Time Zone in MiSTer
I have this issue as well. I'm using StarLink and thought my time would be correct. But for me it is set to another state in Australia. When I run the timezone script is loads shows what it's set to and then end returning back to the MiSTer menu. The file "timezone" in the Linux directory, which is being referenced in the TimeZone script, is unreadable.
Is there a ssh/terminal method? I looked up linux information for this but file location doesn't match.
Thanks,
Re: Setting Time Zone in MiSTer
I decided to play around with this file when I realized I recognized some of the code as timezone information and searched it and tried replacing it with that of my timezone. I preserved the hidden code. Changing it seems to have no effect on the date and/or time.
So I guess when the MiSTer boots the LinuxOS looks up the timezone and then adds it to that file "/media/fat/linux/timezone" and the MiSTer core is getting it form there? Maybe not. If I delete it and then run timezone script it recreated the file. I tried putting a blank file there and changed the privileges; but the MiSTer overwrote regardless.
Assuming that, as mentioned earlier in this thread, it's getting it from my router each boot; which for some reason is set to a different state. Being Startlink I am unable to figure out how to fix this without contacting them. Can't find any option or reference to the routers timezone. I would be ok to remove it; would rather it not there than incorrect. Actually would prefer it not to be there anyway as an option.
Cheers
-
- Core Developer
- Posts: 459
- Joined: Wed May 26, 2021 9:35 pm
- Has thanked: 59 times
- Been thanked: 383 times
Re: Setting Time Zone in MiSTer
EkDor wrote: ↑Sun Jan 14, 2024 5:39 amI decided to play around with this file when I realized I recognized some of the code as timezone information and searched it and tried replacing it with that of my timezone. I preserved the hidden code. Changing it seems to have no effect on the date and/or time.
So I guess when the MiSTer boots the LinuxOS looks up the timezone and then adds it to that file "/media/fat/linux/timezone" and the MiSTer core is getting it form there? Maybe not. If I delete it and then run timezone script it recreated the file. I tried putting a blank file there and changed the privileges; but the MiSTer overwrote regardless.
Assuming that, as mentioned earlier in this thread, it's getting it from my router each boot; which for some reason is set to a different state. Being Startlink I am unable to figure out how to fix this without contacting them. Can't find any option or reference to the routers timezone. I would be ok to remove it; would rather it not there than incorrect. Actually would prefer it not to be there anyway as an option.
Cheers
Try this:
Look for your particular country/state/timezone in /usr/share/zoneinfo, and for example, if you live in Melbourne, Australia, then go to /usr/share/zoneinfo/Australia, and copy the Melbourne file to /media/fat/linux/timezone. Reboot and see if that helps.
Re: Setting Time Zone in MiSTer
Flandango wrote: ↑Sun Jan 14, 2024 2:15 pmTry this:
Look for your particular country/state/timezone in /usr/share/zoneinfo, and for example, if you live in Melbourne, Australia, then go to /usr/share/zoneinfo/Australia, and copy the Melbourne file to /media/fat/linux/timezone. Reboot and see if that helps.
That worked! Did a full power cycle to check it and it's all good. Thank you so much!
Ok I had previously copied part of the code, as mentioned earlier, which didn't work. But this time I just copied the entire file over and renamed it to "timezone" and it worked. There must have been more code hidden in the unreadable code that caused issue resulting in the OS replacing it with a newly generated one; which was of course was wrong for me.
Cheers,.
-
- Core Developer
- Posts: 459
- Joined: Wed May 26, 2021 9:35 pm
- Has thanked: 59 times
- Been thanked: 383 times
Re: Setting Time Zone in MiSTer
EkDor wrote: ↑Thu Jan 18, 2024 6:46 amOk I had previously copied part of the code, as mentioned earlier, which didn't work. But this time I just copied the entire file over and renamed it to "timezone" and it worked. There must have been more code hidden in the unreadable code that caused issue resulting in the OS replacing it with a newly generated one; which was of course was wrong for me.
If you use the Timezone script from the Scripts folder, it determines your location based on your external IP address and what your service provider has registered as its geolocation. In most cases it's fairly accurate, but in other cases, perhaps like with Starlink, they are more general to a single point in a country or state....which may not be yours.
Re: Setting Time Zone in MiSTer
Flandango wrote: ↑Thu Jan 18, 2024 11:57 amIf you use the Timezone script from the Scripts folder, it determines your location based on your external IP address and what your service provider has registered as its geolocation. In most cases it's fairly accurate, but in other cases, perhaps like with Starlink, they are more general to a single point in a country or state....which may not be yours.
Yep thanks. It turns out that's what is going on as I realized another service in my life seems to think I am in that same "wrong" location.
Thanks.