]> git.ipfire.org Git - thirdparty/util-linux.git/commitdiff
add padding to dates in issue file
authorbobbyboy5069 <106821778+bobbyboy5069@users.noreply.github.com>
Fri, 24 Jun 2022 20:02:15 +0000 (23:02 +0300)
committerGitHub <noreply@github.com>
Fri, 24 Jun 2022 20:02:15 +0000 (23:02 +0300)
Pad the day of the month so the length of the date string doesn't change.

term-utils/agetty.c

index 45e25313322993face6bb59ff792bd0c69c7b8db..31a0c52e14df8f43e54f26d0f611df231e8b6849 100644 (file)
@@ -2805,7 +2805,7 @@ static void output_special_char(struct issue *ie,
                localtime_r(&now, &tm);
 
                if (c == 'd') /* ISO 8601 */
-                       fprintf(ie->output, "%s %s %d  %d",
+                       fprintf(ie->output, "%s %s %2d  %d",
                                      nl_langinfo(ABDAY_1 + tm.tm_wday),
                                      nl_langinfo(ABMON_1 + tm.tm_mon),
                                      tm.tm_mday,