From d6cdea0624fe3da9f6de3ba73cb2ec3515633288 Mon Sep 17 00:00:00 2001 From: David Vazgenovich Shakaryan Date: Sun, 23 Sep 2018 02:13:34 -0700 Subject: remove temporary date string --- journal.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/journal.c b/journal.c index 38c3996..bc7aa3f 100644 --- a/journal.c +++ b/journal.c @@ -40,9 +40,9 @@ static void print_entry(char *path, char *ts) struct tm tm; strptime(ts, "%s", &tm); - char date[11]; - strftime(date, sizeof(date), "%Y/%m/%d", &tm); - printf("

%s ", date); + printf( + "

%d/%02d/%02d ", + tm.tm_year + 1900, tm.tm_mon + 1, tm.tm_mday); for (int c = getc(f), nl = 0; c != EOF; c = getc(f)) { if (c == '\n') { -- cgit v1.2.3-70-g09d2