From 2c4493bf21d6524e7594afb68c63d997a8cbd8b3 Mon Sep 17 00:00:00 2001 From: JustAnotherArchivist Date: Wed, 29 Mar 2023 07:09:15 +0000 Subject: [PATCH] Remove uses of external `date` --- codearchiver-bot | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/codearchiver-bot b/codearchiver-bot index 221d6cd..be4e7cf 100755 --- a/codearchiver-bot +++ b/codearchiver-bot @@ -153,7 +153,7 @@ function taint_block { sleep 1 done trap 'rmdir ".loglock"' EXIT # Unlock if something below fails - logbasename="$(date +%Y%m%dT%H%M%SZ)_${singlejobid}" + logbasename="$(printf '%(%Y%m%dT%H%M%SZ)T')_${singlejobid}" if [[ -e "${logbasename}_codearchiver.log" || -e "${logbasename}_codearchiver.log.zst" ]]; then for ((j=0; ; ++j)); do if [[ ! -e "${logbasename}_coll${j}_codearchiver.log" || -e "${logbasename}_coll${j}_codearchiver.log.zst" ]]; then @@ -247,7 +247,7 @@ function taint_block { taint_block 'uploading anything' # Upload - date="$(date '+%Y-%m-%d')" + date="$(printf '%(%Y-%m-%d)T')" identifier="codearchiver_${date//-/}" if [[ -z "${CODEARCHIVER_BOT_TEST}" ]]; then collection='archiveteam_codearchiver'