Messages in this thread | | | Date | Fri, 8 Feb 2013 13:46:29 -0800 | Subject | Re: [PATCH] time, Fix setting of hardware clock in NTP code | From | John Stultz <> |
| |
On Fri, Feb 8, 2013 at 4:55 AM, Prarit Bhargava <prarit@redhat.com> wrote: > diff --git a/kernel/time/ntp.c b/kernel/time/ntp.c > index 24174b4..e98f6b7 100644 > --- a/kernel/time/ntp.c > +++ b/kernel/time/ntp.c > @@ -510,8 +510,12 @@ static void sync_cmos_clock(struct work_struct *work) > } > > getnstimeofday(&now); > - if (abs(now.tv_nsec - (NSEC_PER_SEC / 2)) <= tick_nsec / 2) > - fail = update_persistent_clock(now); > + if (abs(now.tv_nsec - (NSEC_PER_SEC / 2)) <= tick_nsec / 2) { > + struct timespec adjust = now; > + if (persistent_clock_is_local) > + adjust.tv_sec -= (sys_tz.tz_minuteswest * 60); > + fail = update_persistent_clock(adjust); > + } > Do you mind reworking this patch on top of tip/timers/core? There's some recent changes that interact here.
thanks -john
| |