docker entrypoint: use an unambiguous date format

Present a leading zero before the month:
YYYY-0MM-DD

Both YYYY-MM-DD and YYYY-DD-MM are used by people and can be confusing in the beginning of the month.
This commit is contained in:
tcely
2023-05-12 04:16:21 -04:00
parent cb469ca35b
commit ba2a93bad9

View File

@@ -29,7 +29,7 @@ fi
# Backup store log just in case
_file="${logd}/smp-server-store.log"
if [ -f "${_file}" ]; then
_backup_extension="$(date --universal '+%FT%T')"
_backup_extension="$(date --universal '+%04Y-%03m-%02dT%T')"
cp -v -p "${_file}" "${_file}.${_backup_extension:-date-failed}"
unset -v _backup_extension
fi