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

ports/esp8266/modules/ntptime.py: Choose your NTP server. #4622

Closed
wants to merge 1 commit into from
Closed

ports/esp8266/modules/ntptime.py: Choose your NTP server. #4622

wants to merge 1 commit into from

Conversation

bgant
Copy link

@bgant bgant commented Mar 20, 2019

Backwards compatible since ntptime.time() and ntptime.settime() default
to host = "pool.ntp.org" as before. But now you can set a different server
like ntptime.time('time.google.com') or ntptime.settime('192.168.1.1').

Backwards compatible since ntptime.time() and ntptime.settime() default
to host = "pool.ntp.org" as before. But now you can set a different server
like ntptime.time('time.google.com') or ntptime.settime('192.168.1.1').
@pfalcon
Copy link
Contributor

pfalcon commented Mar 20, 2019

This is FAQ. To use another NTP server, you just do ntptime.host = "my.stuff", voila.

@dpgeorge
Copy link
Member

Thanks for the contribution. But, as mentioned above, it's already possible to do this, and in a way that doesn't require specifying the host every time the call to an ntptime function is made. You probably already have a local config constant for the host in your app, so instead of using that constant just use ntptime.host.

@dpgeorge dpgeorge closed this Mar 26, 2019
dpgeorge added a commit that referenced this pull request Jan 31, 2020
The ability to change the host is a frequently requested feature, so
explicitly document how it can be achieved using the existing code.

See issues #2121, #4385, #4622, #5122, #5536.
alu96 pushed a commit to alu96/micropython that referenced this pull request Mar 23, 2020
The ability to change the host is a frequently requested feature, so
explicitly document how it can be achieved using the existing code.

See issues micropython#2121, micropython#4385, micropython#4622, micropython#5122, micropython#5536.
c0d3z3r0 pushed a commit to c0d3z3r0/micropython that referenced this pull request Apr 5, 2020
The ability to change the host is a frequently requested feature, so
explicitly document how it can be achieved using the existing code.

See issues micropython#2121, micropython#4385, micropython#4622, micropython#5122, micropython#5536.
tannewt added a commit to tannewt/circuitpython that referenced this pull request Apr 23, 2021
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

3 participants