Hardware clock set to local time or UTC

Pizzasgood posted some patches to enable choosing whether the hardware clock is set to the local time (most PCs with Windows installed) or UTC:

http://murga-linux.com/puppy/viewtopic.php?t=41680

This is good stuff, thanks for this pizzasgood. I overlooked it until it was pointed out to me just recently.

I have now put this into Woof. The affected scripts are /usr/sbin/set_hwclock_type, /usr/sbin/set-time-for-puppy, /usr/sbin/timezone-set, /etc/rc.d/rc.country.

At first boot (or pfix=ram) an extra question is asked, whether the hardware clock is set to local time or UTC. As well, set_hwclock_type is a GUI to do this after X is running.


Posted on 25 May 2010, 20:15


Comments:

Posted on 26 May 2010, 2:50 by JustGreg
localtime link
I set my clocks to UTC. I am used to using it from my work place and hobbies. I noticed that the symlink /etc/localtime was broken in both Quirky and Puppy 5.0 (Lucid). The symlink /etc/localtime (for UTC) points to /usr/share/zoneinfo/UTC. UTC is not in that directory. I made a new symlink /etc/localtime to point to /usr/share/zoneinfo/Etc/UTC. Everything works now. I also set any Window$ installation to UTC. It does help.


Posted on 26 May 2010, 8:16 by BaryK
Re UTC
In Quirky, /usr/share/zoneinfo/UTC does exist.

Pointing /etc/localtime to <path>/UTC is alright if you do not have daylight saving.

...but, you have to do that in current puppies as they aren't setup to switch between localtime and UTC.

With the way it is now setup in Woof, you continue to point /etc/localtime to your local region, as before. Setting the hardware clock to local-time or UTC is an entirely different thing.

In fact, I think that I will remove the "UTC" choice from the timezone dialog, as it is confusing.



Posted on 26 May 2010, 8:33 by JustGreg
OK!
The issue of day light saving time is something that I do not care about. I use straight UTC all the time. Thank for explaining the difference to me and why it works for me.


Posted on 26 May 2010, 8:43 by BarryK
Re UTC
Ah, I see. /usr/share/zoneinfo/UTC exists when the 'devx' SFS is loaded. I have now fixed Woof so that the 'devx' is built without any extra entries in /usr/share/zoneinfo.

I have also modified /usr/sbin/set-timezone script so that UTC choice is not offered.



Posted on 27 May 2010, 10:22 by Pizzasgood
Cool
Cool!