From 853ee546372969cb91420533623d76e9363e952d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Romain=20Gon=C3=A7alves?= Date: Tue, 28 Sep 2021 09:57:04 +0200 Subject: func: More website param + correct timestamp --- bin/func | 21 ++++++++++++++++----- 1 file changed, 16 insertions(+), 5 deletions(-) diff --git a/bin/func b/bin/func index 793c722..4fe632e 100644 --- a/bin/func +++ b/bin/func @@ -9,9 +9,16 @@ tmp_file="${tmp_dir}/tmp" rss_dir="${src_dir}/b" rss_out_file="${out_dir}/rss.xml" -website_title="rgoncalves.se" -website_link="https://${website_title}" -website_description="hacker and " +website_domain="rgoncalves.se" +website_title="${website_domain}" +website_link="https://${website_domain}" +website_email="contact@${website_domain}" +website_generator="${website_domain}'s ssg" +website_description="devops and hacker D:" +website_language="en" + +date_default_hour="17:00:00" +date_default_timezone="+0200" __get_value() { # 1: filename @@ -59,8 +66,12 @@ __get_value_date_human() { __get_value_date_publication() { # 1: filename # Get publication date according to rfc 2822 and return a safe string. - __get_value_date "${1}" | - xargs date -j -f "%Y-%m-%d" +"%a, %d %b %Y %H:%M:%S %z" + local _date + + _date="$(__get_value_date ${1})" + _date="${_date} ${date_default_hour} ${date_default_timezone}" + + date -j -f "%Y-%m-%d %H:%M:%S %z" +"%a, %d %b %Y %H:%M:%S %z" "${_date}" } __get_out_filename() { -- cgit v1.2.3