summaryrefslogtreecommitdiff
path: root/journal.c
diff options
context:
space:
mode:
authorDavid Vazgenovich Shakaryan <dvshakaryan@gmail.com>2018-09-23 02:13:34 -0700
committerDavid Vazgenovich Shakaryan <dvshakaryan@gmail.com>2018-09-23 02:13:34 -0700
commitd6cdea0624fe3da9f6de3ba73cb2ec3515633288 (patch)
treeefa28e7bb3f7451246d213d58ff69a004b0c8fdc /journal.c
parent026f864b3254cb4e51d916b3439ad352653dcc28 (diff)
downloadjournal-d6cdea0624fe3da9f6de3ba73cb2ec3515633288.tar.gz
journal-d6cdea0624fe3da9f6de3ba73cb2ec3515633288.tar.xz
remove temporary date string
Diffstat (limited to 'journal.c')
-rw-r--r--journal.c6
1 files 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("<div class='entry'><p><span class='date'>%s</span>&emsp;", date);
+ printf(
+ "<div class='entry'><p><span class='date'>%d/%02d/%02d</span>&emsp;",
+ 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') {