Windows – dual booted pc: windows 7 clock becomes wrong after booting linux

crunchbangdebiantimewindowswindows 7

I have dual booted pc, i always do that, this time though, i have installed crunchbang, after booting linux, windows 7 clock becomes wrong, it goes back 3 hours.

i tried to fix it and it stays fixed until i use crunchbang 11 (stable edition), then windows clock goes back 3 hours again. crunchbang clock is always fixed, on cunchbang my hardware time and the clock are the same, the timezone is correct. I don't know how to fix it.

Best Answer

The problem is that Linux by default sets the system clock to UTC time, while Windows sets it to local time.

As far as I'm aware, Windows doesn't make a distinction between system clock time and local time; there is thus no way to have Windows set the system clock to UTC, short of actually telling Windows your time zone is GMT+0.

You will therefore need to configure your Linux installation to set the system clock to localtime, which can be done via the hwclock command -- see the manual for exhaustive detail, but in general, the following command should serve:

hwclock --set --localtime --date="5/31/2013 12:34:56"

(You may also, more conveniently, be able to issue hwclock --systohc --localtime, to copy the system time to the hardware clock and clue hwclock that it's to manage the hardware clock as local time instead of UTC; on that point, you may also need to edit /etc/adjtime to let the system know that it shouldn't try to treat the system clock as UTC on startup and shutdown.)

Related Question