NTP - xoseperez/espurna GitHub Wiki

NTP

🔴 NOTICE Current version will not correctly parse TZ strings starting with: "<[+-]?[0-9]+>"
For more information, see https://github.com/esp8266/Arduino/issues/7690 and https://github.com/esp8266/Arduino/pull/7702

Configuration

Configuration key Build flag Description
ntpServer NTP_SERVER (default: pool.ntp.org)
ntpTZ NTP_TIMEZONE(default: TZ_Etc_UTC, definition value from esp8266/Arduino:cores/esp8266/TZ.h) (default: UTC0)See Values in the table below
ntpDhcp NTP_DHCP_SERVER (default: 1, enabled) Automatically replace the NTP server value with the one received with the DHCP packet
ntpStartDelay NTP_START_DELAY (seconds) (default: 3 seconds) NTP initial update delay after network connection
ntpUpdateIntvl NTP_UPDATE_INTERVAL (default: 1800 seconds / 30 minutes) NTP update interval after an initial sync
NTP_SUPPORT(default: 1, enabled) Build with NTP support

TZ Variable

See the latest timezone variable list

Legacy options

These only apply to Core version 2.3.0 (releases before 1.15.0):

Configuration key Build flag Description
ntpTimeout NTP_TIMEOUT (default: 2000 ms) How long to wait for NTP server response
ntpOffset NTP_TIME_OFFSET (default: 60 minutes, UTC+1)
ntpDst NTP_DAY_LIGHT (defaut: 1) Enable DST based on the current region
ntpRegion NTP_DST_REGION (default: 0, Europe) Set to 1 for USA (Constants defined by the NtpClientLib)
NTP_SYNC_INTERVAL (defaut: 60 seconds) Initial NTP sync interval