Bug 759071 - time is not correct after reboot
time is not correct after reboot
Status: CLOSED DUPLICATE of bug 816752
Product: Fedora
Classification: Fedora
Component: systemd (Show other bugs)
16
Unspecified Unspecified
unspecified Severity unspecified
: ---
: ---
Assigned To: systemd-maint
Fedora Extras Quality Assurance
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2011-12-01 06:20 EST by Marcela Mašláňová
Modified: 2012-09-18 12:07 EDT (History)
8 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2012-09-18 12:07:33 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Marcela Mašláňová 2011-12-01 06:20:51 EST
Description of problem:
After reboot of computer time isn't set correctly.

Version-Release number of selected component (if applicable):
systemd-37-3.fc16.x86_64
chrony-1.26-3.20110831gitb088b7.fc16.x86_64

How reproducible:
After every reboot.

Steps to Reproduce:
1. time is correct, set by chronyd for my time zone
2. switch off computer in 9:58
3. switch on with(out) network
4. time is set to 18:59
  
Actual results:
Without network synchronization is time set to wrong time. I didn't find explanation.  Could it be that I see time, which is set by last call of "hwclock --systohc"?


Expected results:
Correct time, everytime.

Additional info:
This is not bug of chronyd, because it "fixes" the time value. I wonder what people without network will do.
Comment 1 Michal Schmidt 2011-12-01 08:26:12 EST
(In reply to comment #0)
> Could it be that I see time, which is set by last call of
> "hwclock --systohc"?

I don't know. Does running that command change what you're seeing?
Comment 2 Marcela Mašláňová 2011-12-05 02:53:12 EST
(In reply to comment #1)
> (In reply to comment #0)
> > Could it be that I see time, which is set by last call of
> > "hwclock --systohc"?
> 
> I don't know. Does running that command change what you're seeing?

No, it's not related to when I run hwclock.
Comment 3 Michal Schmidt 2012-06-07 11:41:55 EDT
When ntp is used, the kernel writes the current time to to the RTC every 11 minutes, but it only corrects for errors within a 30-minute window. It won't fix the hours. That may explain what you're seeing.

But if it's really it, I'd expect that "hwclock --systohc" run before shutdown to result in the correct time after new boot.
Comment 4 Kay Sievers 2012-09-17 15:18:44 EDT
Michal, do you know which kernel code does the minutes-update-only?

I can't find that limitation in the code. We should decide what to fix here,
if we optionally let the kernel do a full sync instead of minutes only, or
ask the ntp implementations to solve that for us.

But first I need to find the code in the kernel, that does that. :)
Comment 5 Michal Schmidt 2012-09-18 09:40:33 EDT
It's mach_set_rtc_mmss() in arch/x86/kernel/rtc.c
Comment 6 Kay Sievers 2012-09-18 12:07:33 EDT
Merging with #816752 which is the same issue. This one is older, but the
other one has more information, and the discussion took place in the
other bug. Thanks!

*** This bug has been marked as a duplicate of bug 816752 ***

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