diff --git a/mtm-ddwipe b/mtm-ddwipe index f349a28..4494b9f 100755 --- a/mtm-ddwipe +++ b/mtm-ddwipe @@ -2,6 +2,7 @@ declare -r DEV="${1}" declare STARTDATE="" +declare STARTDATESTRING="" show_help() { echo "ddwipe dev (/dev/sdX)" @@ -37,7 +38,8 @@ confirm_wipe() { } wipe_dev() { - STARTDATE="$(date)" + STARTDATE=$(date +%s) + STARTDATESTRING="$(date)" echo "Begin wiping device ${1}" echo "" echo "Start date :" @@ -67,7 +69,7 @@ wipe_dev() { print_time() { echo "" echo "Start date :" - echo "${STARTDATE}" + echo "${STARTDATESTRING}" ENDDATE=$(date +%s) echo "" @@ -83,6 +85,5 @@ print_time() { check_args "${DEV}" check_dev_exist "${DEV}" confirm_wipe "${DEV}" -STARTDATE=$(date +%s) wipe_dev "${DEV}" print_time