From 6775b05d7038ac217e2a0a9bde2bc816e7e8a789 Mon Sep 17 00:00:00 2001 From: "Alexander \"Arav\" Andreev" Date: Sun, 3 Mar 2024 21:32:11 +0400 Subject: [PATCH] In article.pug cache ToClientTimezone() to a var for futher use. --- web/templates/article.pug | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/web/templates/article.pug b/web/templates/article.pug index db0b4c3..c24cb83 100644 --- a/web/templates/article.pug +++ b/web/templates/article.pug @@ -22,5 +22,6 @@ block content h2= title div.menu a(href='/stuff#articles') Go back to articles list - time(datetime=util.ToClientTimezone(date, r).Format("2006-01-02")) #{util.ToClientTimezone(date, r).Format("02 January 2006")} + - dctz := util.ToClientTimezone(date, r) + time(datetime=dctz.Format("2006-01-02")) #{dctz.Format("02 January 2006")} | !{body} \ No newline at end of file