Remix.run Logo
estimator7292 3 days ago

The clock problem is actually a Linux issue. Linux sets the hardware system clock to UTC and only applies time zones when displaying the time.

Windows sets the hardware clock to local time.

Every time one or the other updates the clock, it's now in the wrong format for the other OS. The fix is to tell Linux to use local time. There are no side effects as far as I can tell

bigstrat2003 3 days ago | parent | next [-]

I wouldn't call that a Linux issue or a Windows issue. It's kind of like driving on the left or right side of the road: either way is fine, you just need to have everyone agree on which way they are going to use.

Borealid 3 days ago | parent | next [-]

There in an advantage to using UTC: when legislatures change the rules about which time zone is which, or you move your computer while it's off, the time remains correct.

Using local time for the RTC theoretically makes it simpler to schedule wakeups at user friendly times, but that seems less impactful.

eviks 2 days ago | parent | prev [-]

The better solution is allow config instead of trying to agree, and the best is auto defect and apply the correct config are the OS level

uncircle 2 days ago | parent [-]

How do you autodetect the timezone, when the RTC clock doesn’t have one?

On Linux with one command you can switch between UTC or local RTC time to match Windows. On Windows you need to change a bit in the registry if you want it to adapt to the Linux way - i.e. the correct one.

jh12z 3 days ago | parent | prev | next [-]

I'd say that's a Windows issue and Linux has a solution to make it compatible with Windows. Why would you want the system clock to be in local time instead of UTC? For example you switch off your laptop in one timezone, fly to another timezone, switch it back on, the time has been ticking the same whether you moved to a different timezone or not, you only need to change the timezone for display, why would you need to save back to RTC a different value based on the timezone? I never tested it but I'd like to see what happens on a Windows desktop if you change the timezone and unplug the computer without giving a chance to save to RTC. On next boot the local time read from RTC will be wrong.

Palomides 3 days ago | parent | prev [-]

you can also just tell windows to use UTC for the hardware clock