Skip to content
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

Open
wants to merge 1 commit into
base: beta
Choose a base branch
from
Open

Update run.sh #1811

wants to merge 1 commit into from

Conversation

kittenarmy
Copy link

Date time fix for Static IP #1797

Date time fix for Static IP
@jmtatsch
Copy link
Collaborator

@kittenarmy I dont understand why this would be needed. Why does ntp not work for you?

@dewi-ny-je
Copy link
Contributor

I also don't understand why a static IP would require different treatment of NTP, which is a higher level service

@kittenarmy
Copy link
Author

@kittenarmy I dont understand why this would be needed. Why does ntp not work for you?

I've no idea why it doesn't work. Read what I tried in #1797. I can only get NTP to work over SSH.

@stale
Copy link

stale bot commented Sep 21, 2022

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.

@stale stale bot added the wontfix label Sep 21, 2022
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"
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
date -s "$d"
date -u -s "$d"

Date/Time will be wrong, date/time retrieved via curl are in GMT (during my testing).

@stale stale bot removed wontfix labels Jan 20, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants