Ignore:
Timestamp:
Dec 20, 2016, 4:07:32 PM (7 years ago)
Author:
Bruno Cornec
Message:

New 3?3 banch for incorporation of latest busybox 1.25. Changing minor version to handle potential incompatibilities.

Location:
branches/3.3
Files:
1 edited
1 copied

Legend:

Unmodified
Added
Removed
  • branches/3.3/mindi-busybox/util-linux/hwclock.c

    r3232 r3621  
    7070#else
    7171    char *cp = ctime(&t);
    72     strchrnul(cp, '\n')[0] = '\0';
     72    chomp(cp);
    7373#endif
    7474
     
    9898    struct timezone tz;
    9999
    100     tz.tz_minuteswest = timezone/60 - 60*daylight;
     100    tz.tz_minuteswest = timezone/60;
     101    /* ^^^ used to also subtract 60*daylight, but it's wrong:
     102     * daylight!=0 means "this timezone has some DST
     103     * during the year", not "DST is in effect now".
     104     */
    101105    tz.tz_dsttime = 0;
    102106
     
    249253    broken = localtime(&tv.tv_sec);
    250254    tz.tz_minuteswest = timezone / 60;
    251     if (broken->tm_isdst)
     255    if (broken->tm_isdst > 0)
    252256        tz.tz_minuteswest -= 60;
    253257    tz.tz_dsttime = 0;
     
    306310    applet_long_options = hwclock_longopts;
    307311#endif
     312
     313    /* Initialize "timezone" (libc global variable) */
     314    tzset();
     315
    308316    opt_complementary = "r--wst:w--rst:s--wrt:t--rsw:l--u:u--l";
    309317    opt = getopt32(argv, "lurswtf:", &rtcname);
Note: See TracChangeset for help on using the changeset viewer.