Prevent date formatting if the time flag is not set.

This commit is contained in:
2025-12-08 14:48:32 -07:00
parent 195c315714
commit dd7325da39

View File

@@ -129,10 +129,10 @@ $search "$location" | sort | while read image; do
## Expanded Filename ##
# Add back in the dashes so that the year, month, date, and time are exposed.
TEMP="$new_image_clean"
# Date Data
new_image_exp="${TEMP:0:4}-${TEMP:4:2}-${TEMP:6:2}"
# Time Data
if [[ "$format_time" == "Y" ]]; then
# Date Data
new_image_exp="${TEMP:0:4}-${TEMP:4:2}-${TEMP:6:2}"
# Time Data
new_image_exp="${new_image_exp}_${TEMP:8:2}-${TEMP:10:2}-${TEMP:12:2}"
fi
# Remainder Data