- Timestamp:
- Aug 13, 2022, 12:10:38 AM (21 months ago)
- Location:
- tags/3.2.2/mindi-busybox
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
tags/3.2.2/mindi-busybox/coreutils/date.c
r3232 r3787 268 268 #endif 269 269 } 270 #if !ENABLE_FEATURE_DATE_NANO 271 ts.tv_nsec = 0; 272 #endif 270 273 localtime_r(&ts.tv_sec, &tm_time); 271 274 … … 290 293 tm_time.tm_isdst = -1; 291 294 ts.tv_sec = validate_tm_time(date_str, &tm_time); 295 ts.tv_nsec = 0; 292 296 293 297 maybe_set_utc(opt); 294 298 295 299 /* if setting time, set it */ 296 if ((opt & OPT_SET) && stime(&ts.tv_sec) < 0) {300 if ((opt & OPT_SET) && clock_settime(CLOCK_REALTIME, &ts) < 0) { 297 301 bb_perror_msg("can't set date"); 298 302 } -
tags/3.2.2/mindi-busybox/util-linux/rdate.c
r3232 r3787 68 68 if (current_time == remote_time) 69 69 bb_error_msg("current time matches remote time"); 70 else 71 if (stime(&remote_time) < 0) 72 bb_perror_msg_and_die("can't set time of day"); 70 else { 71 struct timespec ts; 72 ts.tv_sec = remote_time; 73 ts.tv_nsec = 0; 74 if (clock_settime(CLOCK_REALTIME, &ts) < 0) 75 bb_simple_perror_msg_and_die("can't set time of day"); 73 76 } 74 77
Note:
See TracChangeset
for help on using the changeset viewer.