[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: timezones



michael <linux@networkingnewsletter.org.uk> writes:

> Here in the UK we recently went to British Summer Time, putting the
> clocks +1hr from GMT. On my dual boot (Debian + WinXP) it now seems I
> have a problem. WinXP reports the correct BST time, whereas Debian is an
> additional hour in front (ie GMT+2 instead of GMT+1) but I can't work
> out why. A quick Internet search didn't throw anything up.
>
> I'm running:
> michael@manchester-campaigns:~$ uname -a;cat /etc/apt/sources.list
> Linux manchester-campaigns 2.4.18-bf2.4 #1 Son Apr 14 09:53:28 CEST 2002
> i686 GNU/Linux
>
> deb ftp://ftp.uk.debian.org/debian/ unstable main non-free contrib
>
> with Real Time Clock Driver v1.10e
>
> Not sure what other info to add (I thought there were msgs about
> hardware clock at boot but not sure how to access these - not in dmesg)
>
> Ta for any advice!

Don't use Windows myself, but I seem to recall that this is a classic
dual boot problem with Linux/Windows. More specifically, the default
(and reasonable) Linux setup suggests and assumes that your hardware
clock is set to UTC (or GMT, if you will, although those are not strictly
equivalent), while Windows not only assumes that you use local time, but
actually sets your hardware clock this way.

What does that mean? During winter, your local time is UTC + 0, so
when Windows sets the hardware clock to local time, it is still UTC + 0,
and Linux won't be disturbed. When changing to summer time though,
Windows sets the hardware clock to UTC + 1. Linux on the other hand
still assumes it is UTC + 0, and adds another hour for BST, not on the
hardware clock but as system time, which is then hardware clock time + 1.
That's the problem :)

Afaik, there's nothing to correct this on the Windows side. You can
however choose localtime as your default Linux hardware clock time
also with hwclock (cf. man hwclock). In this case, the glibc timezone
library will _not_ add another hour for BST, and Windows and Linux time
should be in sync again. This might have the drawback however that Linux
itself won't change any more from GMT to BST or vice versa. At least that's
the last I heard of, it might have changed in the meantime. So when that
changes occur (last Sunday in March and October), you have to set the
hardware clock either yourself on Linux or, hehe, by booting into Windows :)

Regards, Bruno.



Reply to: