Changeset 3621 in MondoRescue for branches/3.3/mindi-busybox/coreutils/date.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/coreutils/date.c
r3232 r3621 139 139 140 140 #include "libbb.h" 141 #include "common_bufsiz.h" 141 142 #if ENABLE_FEATURE_DATE_NANO 142 143 # include <sys/syscall.h> … … 369 370 370 371 #define date_buf bb_common_bufsiz1 372 setup_common_bufsiz(); 371 373 if (*fmt_dt2str == '\0') { 372 374 /* With no format string, just print a blank line */ … … 374 376 } else { 375 377 /* Handle special conversions */ 376 if ( strncmp(fmt_dt2str, "%f", 2) == 0) {378 if (is_prefixed_with(fmt_dt2str, "%f")) { 377 379 fmt_dt2str = (char*)"%Y.%m.%d-%H:%M:%S"; 378 380 } 379 381 /* Generate output string */ 380 strftime(date_buf, sizeof(date_buf), fmt_dt2str, &tm_time);382 strftime(date_buf, COMMON_BUFSIZE, fmt_dt2str, &tm_time); 381 383 } 382 384 puts(date_buf);
Note:
See TracChangeset
for help on using the changeset viewer.