Skip to content

Commit df05069

Browse files
committed
Replace time algorithm
Use `date` command instead of get it from network.
1 parent 5796bf0 commit df05069

File tree

1 file changed

+1
-7
lines changed

1 file changed

+1
-7
lines changed

superbench.sh

+1-7
Original file line numberDiff line numberDiff line change
@@ -540,13 +540,7 @@ print_end_time() {
540540
#echo $(date +%Y-%m-%d" "%H:%M:%S)
541541
printf '\n' | tee -a $log
542542
#utc_time=$(date -u '+%F %T')
543-
#bj_time=$(date +%Y-%m-%d" "%H:%M:%S -d '+8 hours')
544-
bj_time=$(curl -s http://cgi.im.qq.com/cgi-bin/cgi_svrtime)
545-
#utc_time=$(date +"$bj_time" -d '-8 hours')
546-
547-
if [[ $(echo $bj_time | grep "html") ]]; then
548-
bj_time=$(date -u +%Y-%m-%d" "%H:%M:%S -d '+8 hours')
549-
fi
543+
bj_time=$(TZ=Asia/Shanghai date +%Y-%m-%d" "%H:%M:%S)
550544
echo " Timestamp : $bj_time GMT+8" | tee -a $log
551545
#echo " Finished!"
552546
echo " Results : $log"

0 commit comments

Comments
 (0)