Changeset 3621 in MondoRescue for branches/3.3/mindi-busybox/util-linux/hwclock.c
- Timestamp:
- Dec 20, 2016, 4:07:32 PM (7 years ago)
- Location:
- branches/3.3
- Files:
-
- 1 edited
- 1 copied
Legend:
- Unmodified
- Added
- Removed
-
branches/3.3/mindi-busybox/util-linux/hwclock.c
r3232 r3621 70 70 #else 71 71 char *cp = ctime(&t); 72 strchrnul(cp, '\n')[0] = '\0';72 chomp(cp); 73 73 #endif 74 74 … … 98 98 struct timezone tz; 99 99 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 */ 101 105 tz.tz_dsttime = 0; 102 106 … … 249 253 broken = localtime(&tv.tv_sec); 250 254 tz.tz_minuteswest = timezone / 60; 251 if (broken->tm_isdst )255 if (broken->tm_isdst > 0) 252 256 tz.tz_minuteswest -= 60; 253 257 tz.tz_dsttime = 0; … … 306 310 applet_long_options = hwclock_longopts; 307 311 #endif 312 313 /* Initialize "timezone" (libc global variable) */ 314 tzset(); 315 308 316 opt_complementary = "r--wst:w--rst:s--wrt:t--rsw:l--u:u--l"; 309 317 opt = getopt32(argv, "lurswtf:", &rtcname);
Note:
See TracChangeset
for help on using the changeset viewer.