int pmac_set_rtc_time(unsigned long nowtime) {- return 0;+#ifdef CONFIG_ADB+ struct adb_request req;+#endif+ nowtime += RTC_OFFSET - sys_tz.tz_minuteswest * 60;
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
This needs to be changed to
+ nowtime += RTC_OFFSET - sys_tz.tz_minuteswest * 60 +
(sys_tz.tz_dsttime? 3600: 0);
No, don't handle DST in the kernel!! hwclock handles this in userland, see
the hwclock source for details.
Franz.
** Sent via the linuxppc-dev mail list. See http://lists.linuxppc.org/
int pmac_set_rtc_time(unsigned long nowtime) {- return 0;+#ifdef CONFIG_ADB+ struct adb_request req;+#endif+ nowtime += RTC_OFFSET - sys_tz.tz_minuteswest * 60;
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
This needs to be changed to
+ nowtime += RTC_OFFSET - sys_tz.tz_minuteswest * 60 +
(sys_tz.tz_dsttime? 3600: 0);
No, don't handle DST in the kernel!! hwclock handles this in userland, see
the hwclock source for details.
Oh, "nowtime" is UTC + DST fix up then??? If so, that seems to be broken
to me.
Takashi Oe
** Sent via the linuxppc-dev mail list. See http://lists.linuxppc.org/
Oh, "nowtime" is UTC + DST fix up then??? If so, that seems to be broken
to me
AFAIK, the timezone offset in nvram includes the DST fixup.
Yes, that's right.
My assumption was "nowtime" given to kernel for pmac_set_rtc_time() is
UTC. If that's the case, the following code in pmac_set_rtc_time()
nowtime += RTC_OFFSET - sys_tz.tz_minuteswest * 60;
is incomplete because it does not include DST fix up and the time stored
via CUDA or PMU will be an hour off from localtime which Mac OS uses
during DST is in effect.
Is my assumption correct?
What I was saying is that if "nowtime" given to kernel is neither UTC or
localtime, the interface seems to be broken (to me).
Takashi Oe
** Sent via the linuxppc-dev mail list. See http://lists.linuxppc.org/