]> 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)
committerKarel Zak <kzak@redhat.com>
Wed, 20 Jul 2022 15:59:14 +0000 (17:59 +0200)
Pad the day of the month so the length of the date string doesn't change.

term-utils/agetty.c

index 22850786da0646f1aaa852f075962995570c01fc..cecde2cdf668ebd6305ebc83a189036cec5dc1a7 100644 (file)
@@ -2792,7 +2792,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,