From 083e81d23757d62fec4e57c5e1a103e13f31a323 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Christian=20E=2E=20H=C3=A4u=C3=9Fler?= Date: Mon, 15 Jul 2019 20:39:00 +0200 Subject: [PATCH] Fixed issue #21 If you have a different LC_TIME, date will have different names for the days of the week, which is not RFC 2822 compliant. Always setting the LC_TIME fixes this. --- lb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lb b/lb index aec5d9d..c2a23e7 100755 --- a/lb +++ b/lb @@ -38,7 +38,7 @@ publish() { \ htaccessentry=$(grep "$basefile" "$webdir/blog/.htaccess") realname="$(echo "$htaccessentry" | cut -d'"' -f2)" rssdate="$(grep "$basefile" blog/.htaccess | sed "s/.*\.html\"* *#*//g" | tr -d '\n')" - [ -z "$rssdate" ] && rssdate="$(date '+%a, %d %b %Y %H:%M:%S %z')" # RSS date formats must comply with standards to validate. + [ -z "$rssdate" ] && rssdate="$(LC_TIME=en_US date '+%a, %d %b %Y %H:%M:%S %z')" # RSS date formats must comply with standards to validate. webdate="$(date '+%a, %d %b %Y %H:%M:%S %z')" # But this visible date you can set to any format. tmpdir=$(mktemp -d) printf "\\n\\n%s\\n\\n\\n\\n\\n

%s

\\n[linkstandalone]\\n%s\\n\\n\\n\\n" "$realname" "$css" "$realname" "../$blogfile" "$base" "$basefile" "$(cat "$webdir/blog/.drafts/$basefile")" "$website" "$name" > "$webdir/blog/$basefile"