diff options
author | Romain Gonçalves <me@rgoncalves.se> | 2021-09-28 09:57:04 +0200 |
---|---|---|
committer | Romain Gonçalves <me@rgoncalves.se> | 2021-09-28 09:57:04 +0200 |
commit | 853ee546372969cb91420533623d76e9363e952d (patch) | |
tree | 522427f48cc4ddc88fce58bf85d83e3f2847bbfa /bin/func | |
parent | 0c44f4afd0c3ee568b7ddbc44fa92f5e89f79ac1 (diff) | |
download | rgoncalves.se-853ee546372969cb91420533623d76e9363e952d.tar.gz |
func: More website param + correct timestamp
Diffstat (limited to 'bin/func')
-rw-r--r-- | bin/func | 21 |
1 files changed, 16 insertions, 5 deletions
@@ -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() { |