[Bug 627116] New: Clock always wrong at boot
http://bugzilla.novell.com/show_bug.cgi?id=627116 http://bugzilla.novell.com/show_bug.cgi?id=627116#c0 Summary: Clock always wrong at boot Classification: openSUSE Product: openSUSE 11.3 Version: Final Platform: Other OS/Version: openSUSE 11.3 Status: NEW Severity: Normal Priority: P5 - None Component: Basesystem AssignedTo: bnc-team-screening@forge.provo.novell.com ReportedBy: albert.passalacqua@gmail.com QAContact: qa@suse.de Found By: --- Blocker: --- User-Agent: Mozilla/5.0 (X11; U; Linux x86_64; it; rv:1.9.2.8) Gecko/20100723 SUSE/3.6.8-0.1.1 Firefox/3.6.8 Hello, I installed 11.3 in Italy, and then moved to US, changing time zone in YaST (Hardware clock set to localtime). Then I corrected the time in YaST. The following reboot, the time was wrong of 7 hours (the difference between Italy and US). So I followed some suggestion given to me on IRC: - Set time with date - Sync hwclock to system time - Delete /etc/adjtime When the system is on, both the clocks are fine, but at the following reboot the problem is there again. I then found this post: http://forums.opensuse.org/english/get-help-here/install-boot-login/437966-s... where the proposed solution is the same as above, but with the addition of running mkinitrd at the end. It worked, however it is not clear to me why I should run mkinitrd to change the time, and I think it is a bug. Thanks Reproducible: Always -- Configure bugmail: http://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
http://bugzilla.novell.com/show_bug.cgi?id=627116
http://bugzilla.novell.com/show_bug.cgi?id=627116#c
yang xiaoyu
http://bugzilla.novell.com/show_bug.cgi?id=627116
http://bugzilla.novell.com/show_bug.cgi?id=627116#c1
Jiří Suchomel
http://bugzilla.novell.com/show_bug.cgi?id=627116
http://bugzilla.novell.com/show_bug.cgi?id=627116#c2
Dr. Werner Fink
http://bugzilla.novell.com/show_bug.cgi?id=627116
http://bugzilla.novell.com/show_bug.cgi?id=627116#c3
Jiří Suchomel
http://bugzilla.novell.com/show_bug.cgi?id=627116
http://bugzilla.novell.com/show_bug.cgi?id=627116#c4
--- Comment #4 from Peter Varkoly
http://bugzilla.novell.com/show_bug.cgi?id=627116
http://bugzilla.novell.com/show_bug.cgi?id=627116#c5
--- Comment #5 from Jiří Suchomel
Not every time. Only if hwclock is set to localtime.
In this case you have to make following changes:
1. Write /etc/localtime 2. mkinitrd 3. Set hwclock
Do not use "date" to set the time! "date" corrects the kernel time, but this is every time in UTC!!!
YaST does not use date to set the time, it uses hwclock command, see comment 1
the best way is to set the hwclock to localtime.
You mean UTC. But this is the advice for user, and we already know that. But not every user uses UTC in HW clock, so we must somehow live with it. -- Configure bugmail: http://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
http://bugzilla.novell.com/show_bug.cgi?id=627116
http://bugzilla.novell.com/show_bug.cgi?id=627116#c6
--- Comment #6 from Peter Varkoly
http://bugzilla.novell.com/show_bug.cgi?id=627116
http://bugzilla.novell.com/show_bug.cgi?id=627116#c7
--- Comment #7 from Alberto Passalacqua
http://bugzilla.novell.com/show_bug.cgi?id=627116
http://bugzilla.novell.com/show_bug.cgi?id=627116#c8
Jiří Suchomel
Not every time. Only if hwclock is set to localtime.
In this case you have to make following changes:
1. Write /etc/localtime 2. mkinitrd 3. Set hwclock
what i'm doing 1. /usr/sbin/zic -l timezone 2. hwclock --set 3. mkinitrd hwclock call need to be before mkinitrd, as mkinitrd call takes some time and correct time would not be known after it but after reboot, my system time still is not the same as hw clock. Does the kernel take into consideration current timezone? i manually changed the time to something different than in selected time zone... or what else could be wrong? -- Configure bugmail: http://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
http://bugzilla.novell.com/show_bug.cgi?id=627116
http://bugzilla.novell.com/show_bug.cgi?id=627116#c9
--- Comment #9 from Jiří Suchomel
http://bugzilla.novell.com/show_bug.cgi?id=627116
http://bugzilla.novell.com/show_bug.cgi?id=627116#c10
--- Comment #10 from Jiří Suchomel
http://bugzilla.novell.com/show_bug.cgi?id=627116
http://bugzilla.novell.com/show_bug.cgi?id=627116#c11
Alberto Passalacqua
http://bugzilla.novell.com/show_bug.cgi?id=627116
http://bugzilla.novell.com/show_bug.cgi?id=627116#c12
Jiří Suchomel
http://bugzilla.novell.com/show_bug.cgi?id=627116
http://bugzilla.novell.com/show_bug.cgi?id=627116#c13
--- Comment #13 from Peter Varkoly
http://bugzilla.novell.com/show_bug.cgi?id=627116
http://bugzilla.novell.com/show_bug.cgi?id=627116#c14
--- Comment #14 from Jiří Suchomel
The process is by booting following: The system reads the hwclock and take a look at /etc/sysconfig/clock for hwclock state. Is it UTC sets the hwclock time to kernel time. Is it localtime calculates the UTC from hwclock time using the time zone given in /etc/localtime and sets the so calculated UTC to the kernel time.
And what is the mkinitrd call for? During boot, you already know that hwclock is in localtime (this is written in /etc/sysconfig/clock) and /etc/localtime was set by YaST after changing the time zone. -- Configure bugmail: http://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
http://bugzilla.novell.com/show_bug.cgi?id=627116
http://bugzilla.novell.com/show_bug.cgi?id=627116#c15
Peter Varkoly
(In reply to comment #13)
The process is by booting following: The system reads the hwclock and take a look at /etc/sysconfig/clock for hwclock state. Is it UTC sets the hwclock time to kernel time. Is it localtime calculates the UTC from hwclock time using the time zone given in /etc/localtime and sets the so calculated UTC to the kernel time.
And what is the mkinitrd call for? To save /etc/sysconfig/clock and /etc/localtime in to initrd During boot, you already know that hwclock is in localtime (this is written in /etc/sysconfig/clock) and /etc/localtime was set by YaST after changing the time zone. Setting the time is happened before the / is mounted.
-- Configure bugmail: http://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
http://bugzilla.novell.com/show_bug.cgi?id=627116
http://bugzilla.novell.com/show_bug.cgi?id=627116#c16
Jiří Suchomel
http://bugzilla.novell.com/show_bug.cgi?id=627116
http://bugzilla.novell.com/show_bug.cgi?id=627116#c17
Alberto Passalacqua
https://bugzilla.novell.com/show_bug.cgi?id=627116
https://bugzilla.novell.com/show_bug.cgi?id=627116#c18
Jiří Suchomel
https://bugzilla.novell.com/show_bug.cgi?id=627116
https://bugzilla.novell.com/show_bug.cgi?id=627116#c19
--- Comment #19 from Alberto Passalacqua
https://bugzilla.novell.com/show_bug.cgi?id=627116
https://bugzilla.novell.com/show_bug.cgi?id=627116#c20
Jiří Suchomel
https://bugzilla.novell.com/show_bug.cgi?id=627116
https://bugzilla.novell.com/show_bug.cgi?id=627116#c21
Jiří Suchomel
https://bugzilla.novell.com/show_bug.cgi?id=627116
https://bugzilla.novell.com/show_bug.cgi?id=627116#c22
Alberto Passalacqua
https://bugzilla.novell.com/show_bug.cgi?id=627116
https://bugzilla.novell.com/show_bug.cgi?id=627116#c23
Jiří Suchomel
https://bugzilla.novell.com/show_bug.cgi?id=627116
https://bugzilla.novell.com/show_bug.cgi?id=627116#c25
Pedro Gomes
https://bugzilla.novell.com/show_bug.cgi?id=627116
https://bugzilla.novell.com/show_bug.cgi?id=627116#c26
Swamp Workflow Management
https://bugzilla.novell.com/show_bug.cgi?id=627116
https://bugzilla.novell.com/show_bug.cgi?id=627116#c27
Christian Dengler
https://bugzilla.novell.com/show_bug.cgi?id=627116
https://bugzilla.novell.com/show_bug.cgi?id=627116#c28
Jiří Suchomel
https://bugzilla.novell.com/show_bug.cgi?id=627116
https://bugzilla.novell.com/show_bug.cgi?id=627116#c29
Swamp Workflow Management
https://bugzilla.novell.com/show_bug.cgi?id=627116
https://bugzilla.novell.com/show_bug.cgi?id=627116#c
Swamp Workflow Management
https://bugzilla.novell.com/show_bug.cgi?id=627116
https://bugzilla.novell.com/show_bug.cgi?id=627116#c30
--- Comment #30 from Jean Delvare
http://bugzilla.novell.com/show_bug.cgi?id=627116
http://bugzilla.novell.com/show_bug.cgi?id=627116#c32
--- Comment #32 from Bernhard Wiedemann
participants (1)
-
bugzilla_noreply@novell.com