summaryrefslogtreecommitdiff
path: root/journal.c
diff options
context:
space:
mode:
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') {