Bug 637058 - ntpdate doesn't care with UTC settings
Summary: ntpdate doesn't care with UTC settings
Alias: None
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: initscripts
Version: 6.1
Hardware: All
OS: Linux
Target Milestone: rc
: ---
Assignee: initscripts Maintenance Team
QA Contact: qe-baseos-daemons
Depends On:
TreeView+ depends on / blocked
Reported: 2010-09-24 07:15 UTC by Levente Farkas
Modified: 2011-05-19 13:51 UTC (History)
3 users (show)

Fixed In Version: initscripts-9.03.18-1.el6
Doc Type: Bug Fix
Doc Text:
Clone Of:
Last Closed: 2011-05-19 13:51:37 UTC
Target Upstream Version:

Attachments (Terms of Use)

System ID Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2011:0647 normal SHIPPED_LIVE initscripts bug fix and enhancement update 2011-05-19 09:37:27 UTC

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 
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.


Note You need to log in before you can comment on or make changes to this bug.