From 233af588b4fd66ebc0ebc3d9be6b3a2605f14c8c Mon Sep 17 00:00:00 2001 From: Paul Buetow Date: Sat, 8 May 2021 10:09:16 +0100 Subject: use gdate --- buetow.org.sh | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/buetow.org.sh b/buetow.org.sh index 2fe68d76..ce35b7e3 100755 --- a/buetow.org.sh +++ b/buetow.org.sh @@ -3,6 +3,11 @@ declare -r ARG=$1; shift source buetow.org.conf +declare DATE=date +if where gdate &>/dev/null; then + DATE=gdate +fi + ## Test module assert::equals () { @@ -80,7 +85,7 @@ atomfeed::meta () { local summary=$(sed -n '/^[A-Z]/ { p; q; }' "$gmi_file_path" | tr '"' "'") # Extract the date from the file name. local filename_date=$(basename $gmi_file_path | cut -d- -f1,2,3) - local date=$(date --iso-8601=seconds --date "$filename_date $(date +%H:%M:%S)") + local date=$($DATE --iso-8601=seconds --date "$filename_date $(date +%H:%M:%S)") cat < "$atom_file.tmp" -- cgit v1.2.3