From f976f85c263b89ab015e06b3011c8eb2bcbc011b Mon Sep 17 00:00:00 2001 From: xyz Date: Mon, 23 May 2022 23:02:02 -0700 Subject: dateft use multiple && --- home/xyz/.local/bin/dateft | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'home') diff --git a/home/xyz/.local/bin/dateft b/home/xyz/.local/bin/dateft index 269cb7f0..b3174749 100755 --- a/home/xyz/.local/bin/dateft +++ b/home/xyz/.local/bin/dateft @@ -22,9 +22,7 @@ date -d "$time_from" TZ="Asia/Shanghai" date -d "$time_from" date -d "$time_from" -u date -d "$time_from" +%s -if [ "$tz_from" ] && [ "$tz_from" != "Asia/Shanghai" ]; then - TZ="$tz_from" date -d "$time_from" -fi +[ "$tz_from" ] && [ "$tz_from" != "Asia/Shanghai" ] && TZ="$tz_from" date -d "$time_from" IFS=',' for tz in $tz_to; do TZ="$tz" date -d "$time_from" -- cgit v1.2.3-70-g09d2