Bug 637058

Summary: ntpdate doesn't care with UTC settings
Product: Red Hat Enterprise Linux 6 Reporter: Levente Farkas <lfarkas>
Component: initscriptsAssignee: initscripts Maintenance Team <initscripts-maint-list>
Status: CLOSED ERRATA QA Contact: qe-baseos-daemons
Severity: medium Docs Contact:
Priority: low    
Version: 6.1CC: azelinka, notting, plautrba
Target Milestone: rc   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: initscripts-9.03.18-1.el6 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2011-05-19 13:51:37 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Levente Farkas 2010-09-24 07:15:04 UTC
according to /usr/share/doc/initscripts-9.03.11/sysconfig.txt i've to set in /etc/sysconfig/clock UTC to no if i'd like to use hardware clock in local time rather then utc. in this case if the same laptop has both linux and windows both system can show the right local time. but currently /etc/init.d/ntpdate doesn't care with UTC settings just see SYNC_HWCLOCK from /etc/sysconfig/ntpdate. which means that if i set 
SYNC_HWCLOCK=yes
UTC=no
it still write back utc time into bios and after i boot into windows i see the wrong time. so  /etc/init.d/ntpdate should have to look into /etc/sysconfig/clock's UTC too.

Comment 2 Miroslav Lichvar 2010-09-27 13:21:00 UTC
Initscripts and ntpdate no longer use the UTC variable. hwclock uses the mode which was specified last time and is stored in /etc/adjtime.

To fix your problem, you just need to run hwclock --systohc --localtime.

So this is actually a documentation bug, reassigning to initscripts.

Comment 3 Levente Farkas 2010-09-27 13:32:08 UTC
but what should i have to set in adjtime to use localtime?

Comment 4 Bill Nottingham 2010-09-27 17:10:30 UTC
The third line in /etc/adjtime should be set to 'LOCAL' for localtime usage.

See the hwclock man page for details.

I've clarified the docs in sysconfig.txt in upstream git; this may make a future RHEL release.

Comment 5 Levente Farkas 2010-09-27 20:40:33 UTC
it'd have to doc in upstream sysconfig.txt and also document that /etc/sysconfig/clock don't have this setting also it'd be useful if there can be a tool which can properly set these files (currently i only know anaconda during install time).

Comment 6 Levente Farkas 2010-10-29 20:11:50 UTC
coudl you close this bug?

Comment 7 Bill Nottingham 2010-10-29 20:31:55 UTC
Not closing it, it's open to track the documentation change in some future RHEL update.

Comment 11 errata-xmlrpc 2011-05-19 13:51:37 UTC
An advisory has been issued which should help the problem
described in this bug report. This report is therefore being
closed with a resolution of ERRATA. For more information
on therefore solution and/or where to find the updated files,
please follow the link below. You may reopen this bug report
if the solution does not work for you.

http://rhn.redhat.com/errata/RHBA-2011-0647.html