From 8b390a2f774ace5e62953269464d67dd43dd53e7 Mon Sep 17 00:00:00 2001 From: Ivan Malison Date: Mon, 22 Feb 2016 11:12:23 -0800 Subject: [PATCH] parsetimestamp2 --- dotfiles/lib/shellenv/functions.sh | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/dotfiles/lib/shellenv/functions.sh b/dotfiles/lib/shellenv/functions.sh index a9c1a392..342055c0 100644 --- a/dotfiles/lib/shellenv/functions.sh +++ b/dotfiles/lib/shellenv/functions.sh @@ -328,6 +328,10 @@ function timestamp { } function parse_timestamp { + date -d "@$1" +} + +function parse_timestamp2 { date -d "@$(echo $1 | cut -c -10)" -Iseconds }