summaryrefslogtreecommitdiff
path: root/sh
diff options
context:
space:
mode:
authorXiao Pan <xyz@flylightning.xyz>2025-07-10 10:56:55 +0800
committerXiao Pan <xyz@flylightning.xyz>2025-07-10 10:56:55 +0800
commit424219312c02150c94b7983b6539fc3e7ac7a3c5 (patch)
tree393865f188dc1e8c842cc4b9922529ab8b197bc3 /sh
parentd9a4056f738aff322d2c350b3d62a3e4f00cdcfa (diff)
dateft no need to display Beijing time because I moved
Diffstat (limited to 'sh')
-rwxr-xr-xsh/dateft6
1 files changed, 3 insertions, 3 deletions
diff --git a/sh/dateft b/sh/dateft
index b317474..cfe0937 100755
--- a/sh/dateft
+++ b/sh/dateft
@@ -1,9 +1,9 @@
#!/bin/sh
# DATE From To
-while getopts cfF:t:T: opt; do
+while getopts fF:t:T: opt; do
case $opt in
- c) tz_from="Asia/Shanghai";;
+ #c) tz_from="Asia/Shanghai";;
f) tz_from="$(tzselect)";;
F) tz_from="$OPTARG";;
# one extra ',' at the end will not let `for tz in ...` loop one extra time?
@@ -19,7 +19,7 @@ shift $((OPTIND-1))
time_from="TZ=\"${tz_from:-$(readlink /etc/localtime | sed 's#.*/\(.*/.*\)$#\1#')}\" ${1:-now}"
date -d "$time_from"
-TZ="Asia/Shanghai" date -d "$time_from"
+#TZ="Asia/Shanghai" date -d "$time_from"
date -d "$time_from" -u
date -d "$time_from" +%s
[ "$tz_from" ] && [ "$tz_from" != "Asia/Shanghai" ] && TZ="$tz_from" date -d "$time_from"