fix strftime %s not to zero pad with default width=2
authorSzabolcs Nagy <nsz@port70.net>
Thu, 8 May 2014 17:04:48 +0000 (19:04 +0200)
committerSzabolcs Nagy <nsz@port70.net>
Thu, 8 May 2014 17:04:48 +0000 (19:04 +0200)
src/time/strftime.c

index bc150139ee309b4990c9ad29041d8dd5f585c739..75ebca62944987676ac712afba3e2f015e2cf8e5 100644 (file)
@@ -126,6 +126,7 @@ const char *__strftime_fmt_1(char (*s)[100], size_t *l, int f, const struct tm *
                goto recu_strftime;
        case 's':
                val = __tm_to_secs(tm) + tm->__tm_gmtoff;
+               width = 1;
                goto number;
        case 'S':
                val = tm->tm_sec;