Automated Change by GitHub Action

This commit is contained in:
okunze authored and github-actions[bot] committed 2024-03-08 21:05:30 +00:00
1 parent 693b20a221
commit 7e0efe0de8
1 file changed
+1 -2
+1 -2
View File
@@ -8,9 +8,8 @@ echo "*************"
# Check time if need to 'fix' # Check time if need to 'fix'
NEEDSTIMESYNC=0 NEEDSTIMESYNC=0
LOCALTIME=$(date -u +%s%N | cut -b1-10) LOCALTIME=$(date -u +%s%N | cut -b1-10)
GLOBALTIME=$(curl -s 'https://worldtimeapi.org/api/ip.txt' | grep unixtime | cut -b11-20) GLOBALTIME=$(curl -s 'http://worldtimeapi.org/api/ip.txt' | grep unixtime | cut -b11-20)
TIMEDIFF=$((GLOBALTIME-LOCALTIME)) TIMEDIFF=$((GLOBALTIME-LOCALTIME))
echo "Local $LOCALTIME vs Global $GLOBALTIME $TIMEDIFF"
# about 26hrs, max timezone difference # about 26hrs, max timezone difference
if [ $TIMEDIFF -gt 100000 ] if [ $TIMEDIFF -gt 100000 ]