diff options
author | Dave Reisner <d@falconindy.com> | 2010-01-23 18:31:01 -0500 |
---|---|---|
committer | Dave Reisner <d@falconindy.com> | 2010-01-23 18:31:01 -0500 |
commit | cab2850f364367845114f87115df05f4e0e01541 (patch) | |
tree | ce4c3f0de0c035c4e06ee97f28ad2de8c2313b6b /squashfu | |
parent | 6acd865fad83031991bd4935eea414397946626f (diff) | |
download | squashfu-cab2850f364367845114f87115df05f4e0e01541.tar.gz |
Use saner conversion of epoch to human readable timestamps
Diffstat (limited to 'squashfu')
-rwxr-xr-x | squashfu | 6 |
1 files changed, 3 insertions, 3 deletions
@@ -292,7 +292,7 @@ action_remove_bin () { local timestamp=$(sed -n "/^$1:/s/^[0-9]*:\([0-9]*\)/\1/p" "${BINVENTORY}") printf "\t%15s %s\n\t%15s %s\n\t%15s %s\n" \ "Bin:" "$1" \ - "Date Created:" "$(date --rfc-3339=seconds --date="1970-01-01 $timestamp sec GMT")" \ + "Date Created:" "$(date --rfc-3339=seconds --date="@$timestamp")" \ "Size:" "$(du -sh "${BINS_DIR}/$1" 2>/dev/null | awk '{print $1}')" read -p "Confirm deletion (y/N)" confirm @@ -343,7 +343,7 @@ action_rollback () { local rb_timestamp=$(grep -E "^${bin_list[@]:(-$num_to_mount):1}:" "$BINVENTORY" | cut -d: -f2) - info "You have rolled back to $(date --rfc-3339=seconds --date="1970-01-01 $rb_timestamp sec GMT")" + info "You have rolled back to $(date --rfc-3339=seconds --date="@$rb_timestamp")" info "Your files can be found at '${UNION_MOUNT}'" } @@ -363,7 +363,7 @@ action_report () { printf "%10s\t%25s\t%7s\n" "Bin ID" "Date Created" "Size" grep -vE "^[\t ]*$" "$BINVENTORY" | sort -r -t: -k2 -n | while read bin stamp; do printf "%10d\t%25s\t%7s\n" "$bin" \ - "$(date --rfc-3339=seconds --date="1970-01-01 $stamp sec GMT")" \ + "$(date --rfc-3339=seconds --date="@$stamp")" \ "${DATA[$bin]}" done IFS=$OLDIFS |