site  contact  subhomenews

Hardware clock set to local time or UTC

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

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/

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.


localtime link
Username: JustGreg
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."26 May 2010, 2:50"01616"'Re UTC"BaryK"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. Username: 26 May 2010, 8:16
"01616"'OK!"JustGreg"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."26 May 2010, 8:33"01616"'Re UTC"BarryK"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. Username: 26 May 2010, 8:43
"01616"'Cool"Pizzasgood"Cool!"27 May 2010, 10:22"01616"'

Tags: woof