%F is specified by ISO C99. It adds semantic meaning as printing an
ISO 8601 date.
Scripted change:
$ cat ~/tmp/spatch/strftime_F.sp
@@
@@
- "%Y-%m-%d"
+ "%F"
$ find contrib/ lib* src/ -type f \
| xargs spatch --sp-file ~/tmp/spatch/strftime_F.sp --in-place
Signed-off-by: Alejandro Colomar <alx@kernel.org>
return;
}
- if (strftime(buf, size, "%Y-%m-%d", &tm) == 0)
+ if (strftime(buf, size, "%F", &tm) == 0)
strtcpy(buf, "future", size);
}
return;
}
- STRFTIME(buf, iflg ? "%Y-%m-%d" : "%b %d, %Y", &tm);
+ STRFTIME(buf, iflg ? "%F" : "%b %d, %Y", &tm);
(void) puts (buf);
}