[Bug 5114] New: [patch] hwclock -s -u always load tz.tz_minuteswest = 0 in linux kernel

bugzilla at busybox.net bugzilla at busybox.net
Wed Apr 18 11:10:05 UTC 2012


https://bugs.busybox.net/show_bug.cgi?id=5114

           Summary: [patch] hwclock -s -u always load tz.tz_minuteswest =
                    0 in linux kernel
           Product: Busybox
           Version: unspecified
          Platform: All
        OS/Version: Linux
            Status: NEW
          Severity: major
          Priority: P5
         Component: Other
        AssignedTo: unassigned at busybox.net
        ReportedBy: p.kosyh at gmail.com
                CC: busybox-cvs at busybox.net
   Estimated Hours: 0.0


Created attachment 4286
  --> https://bugs.busybox.net/attachment.cgi?id=4286
patch

Due to the bug in hwclock.c
hwclock -s -u is always load 0 tz in linux kernel.

The problem is here:
static void to_sys_clock(const char **pp_rtcname, int utc)
{
        struct timeval tv;
        struct timezone tz;
/* here timezone in uclibc is not initialized */
        tz.tz_minuteswest = timezone/60 - 60*daylight;
        tz.tz_dsttime = 0;
        tv.tv_sec = read_rtc(pp_rtcname, NULL, utc);
/* after read_rtc timezone is initialized, because of tzset(), wich is called
from rtc.c, but it's too late :( */


So, here is simple patch thats works for me.

-- 
Configure bugmail: https://bugs.busybox.net/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.


More information about the busybox-cvs mailing list