summaryrefslogtreecommitdiff
path: root/home
diff options
context:
space:
mode:
authorxyz <gky44px1999@gmail.com>2022-05-23 23:02:02 -0700
committerxyz <gky44px1999@gmail.com>2022-05-23 23:02:02 -0700
commitf976f85c263b89ab015e06b3011c8eb2bcbc011b (patch)
treed8a8822343ae6f6f8c346d5fe183c95d7f9caf17 /home
parent98a5c320596832e68e42a7632c1e33daa16be216 (diff)
dateft use multiple &&
Diffstat (limited to 'home')
-rwxr-xr-xhome/xyz/.local/bin/dateft4
1 files changed, 1 insertions, 3 deletions
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"