How to show the correct local time if dual/multi-booting

Puppy and Windows show the correct time only when your hardware clock is set to local time, not UTC time. Many other distros of linux and unix correctly handle the time when the hardware clock is set to either UTC or local time.

If you are dual-booting another distro, eg Ubuntu, and have set the the hardware clock to store the time in UTC, you need to change this to localtime, so Puppy (and Windows) can co-exist on the computer.

(Actually there is almost no point in storing the time in the hardware clock in UTC. Change it to localtime. You can still move the machine around the world, and simply tell each installed system which timezone you are in as you move, and that system will always show the correct time for whereever you are.)

To change the hardware clock: (under Ubuntu)

Set the hardware clock to UTC and update /etc/adjtime accordingly, by running the command:

hwclock --localtime --set --date="`date`"

Make sure Ubuntu keeps the hardware clock in local time at startup/shutdown, by editing /etc/defaults/rc.S, setting "UTC=no".

Further considerations

If you set up a new machine to dual/multi-boot Windows and linuxes, the best order of installation is:

  1. Install Windows. This will set the hardware clock to localtime.
  2. Install eg Ubuntu, (and others?) and tell them that the hardware clock is set to localtime. Also install grub in the MBR, when you install the first distro, so you can dual/multi-boot Windows and other linux distros.
  3. Install Puppy. It only works correctly with localtime, as described above, unless you like hacking. Add the following to /etc/grub/menu.lst to add Puppy into the multi-boot.
title Puppy Linux - Boot into a New Setup
rootnoverify (hd0,0)
kernel /boot/puppy/vmlinuz ro root=/dev/ram0 ramdisk_size=93952 psubdir=/boot/puppy pfix=ram
initrd /boot/puppy/initrd.gz

title Puppy Linux - Normal Boot
rootnoverify (hd0,0)
kernel /boot/puppy/vmlinuz root=/dev/ram0 ramdisk_size=93952 psubdir=/boot/puppy PMEDIA=idehd
initrd /boot/puppy/initrd.gz

The above assumes you have installed Puppy files into the first partition of your first hard disk "(hd0,0)", which in my case is the / partition of Ubuntu. The files to put into there are:

I got a good refresher of how time works on the computer via these manual pages from in Ubuntu:

man hwclock
man adjtime

Notes: All the above assumes Windows 2000 or XP, probably NT and possibly Win98 too. I have no idea (nor interest) in what havoc Microsoft has done with this aspect of interoperability under Vista. Based on their past record, I can only expect the worst!


Delicious Digg Technorati Reddit Furl BlinkList Yahoo! NewsVine Netscape Google Live Bookmark Netvouz Squidoo StumbleUpon Magnolia.png