diff options
author | David Vazgenovich Shakaryan <dvshakaryan@gmail.com> | 2018-09-23 02:13:34 -0700 |
---|---|---|
committer | David Vazgenovich Shakaryan <dvshakaryan@gmail.com> | 2018-09-23 02:13:34 -0700 |
commit | d6cdea0624fe3da9f6de3ba73cb2ec3515633288 (patch) | |
tree | efa28e7bb3f7451246d213d58ff69a004b0c8fdc /journal.c | |
parent | 026f864b3254cb4e51d916b3439ad352653dcc28 (diff) | |
download | journal-d6cdea0624fe3da9f6de3ba73cb2ec3515633288.tar.gz journal-d6cdea0624fe3da9f6de3ba73cb2ec3515633288.tar.xz |
remove temporary date string
Diffstat (limited to 'journal.c')
-rw-r--r-- | journal.c | 6 |
1 files changed, 3 insertions, 3 deletions
@@ -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("<div class='entry'><p><span class='date'>%s</span> ", date); + printf( + "<div class='entry'><p><span class='date'>%d/%02d/%02d</span> ", + 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') { |