-
Notifications
You must be signed in to change notification settings - Fork 1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Update run.sh #1811
base: beta
Are you sure you want to change the base?
Update run.sh #1811
Conversation
Date time fix for Static IP
@kittenarmy I dont understand why this would be needed. Why does ntp not work for you? |
I also don't understand why a static IP would require different treatment of NTP, which is a higher level service |
I've no idea why it doesn't work. Read what I tried in #1797. I can only get NTP to work over SSH. |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. |
if [ -f $CONFIGPATH/staticip.conf -a -f $CONFIGPATH/resolv.conf -a -f $CONFIGPATH/defaultgw.conf ]; then | ||
str=$(/system/sdcard/bin/curl -s --head http://google.com | grep ^Date: | sed 's/Date: //g') | ||
d=$(date -d "$str" -D "%a, %d %b %Y %T %Z" +'%Y-%m-%d %H:%M:%S') | ||
date -s "$d" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
date -s "$d" | |
date -u -s "$d" |
Date/Time will be wrong, date/time retrieved via curl are in GMT (during my testing).
Date time fix for Static IP #1797