From c2ef613b99d01e742127d894756e49f42b1f264d Mon Sep 17 00:00:00 2001 From: Toni Uhlig Date: Sat, 13 Nov 2021 18:23:25 +0100 Subject: std::strftime format Signed-off-by: Toni Uhlig --- src/content/blog/Blog.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/content/blog') diff --git a/src/content/blog/Blog.cpp b/src/content/blog/Blog.cpp index 52951de..4b34caf 100644 --- a/src/content/blog/Blog.cpp +++ b/src/content/blog/Blog.cpp @@ -216,7 +216,7 @@ void Blog::FillRenderData(RenderData & re, BlogEntry const & be) re["author"] = be->author; { char tmstr[64]; - if (std::strftime(tmstr, sizeof(tmstr), "%c", std::localtime(&be->createDate)) > 0) + if (std::strftime(tmstr, sizeof(tmstr), "%d.%m.%Y %H:%M", std::localtime(&be->createDate)) > 0) { re["createDate"] = tmstr; } @@ -227,7 +227,7 @@ void Blog::FillRenderData(RenderData & re, BlogEntry const & be) } { char tmstr[64]; - if (std::strftime(tmstr, sizeof(tmstr), "%c", std::localtime(&be->publishDate)) > 0) + if (std::strftime(tmstr, sizeof(tmstr), "%d.%m.%Y %H:%M", std::localtime(&be->publishDate)) > 0) { re["publishDate"] = tmstr; } -- cgit v1.2.3