aboutsummaryrefslogtreecommitdiffstats
path: root/squashfu
diff options
context:
space:
mode:
authorDave Reisner <d@falconindy.com>2010-01-23 18:31:01 -0500
committerDave Reisner <d@falconindy.com>2010-01-23 18:31:01 -0500
commitcab2850f364367845114f87115df05f4e0e01541 (patch)
treece4c3f0de0c035c4e06ee97f28ad2de8c2313b6b /squashfu
parent6acd865fad83031991bd4935eea414397946626f (diff)
downloadsquashfu-cab2850f364367845114f87115df05f4e0e01541.tar.gz
Use saner conversion of epoch to human readable timestamps
Diffstat (limited to 'squashfu')
-rwxr-xr-xsquashfu6
1 files changed, 3 insertions, 3 deletions
diff --git a/squashfu b/squashfu
index c3c94f1..5d20085 100755
--- a/squashfu
+++ b/squashfu
@@ -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