17#ifndef DETERMINISTICESPASYNCWEBSERVER_NTP_SERVICE_H
18#define DETERMINISTICESPASYNCWEBSERVER_NTP_SERVICE_H
37bool detws_ntp_begin(
const char *tz =
nullptr,
const char *server1 =
"pool.ntp.org",
38 const char *server2 =
"time.nist.gov");
User-facing configuration for DeterministicESPAsyncWebServer.
void detws_ntp_set_test_epoch(time_t epoch)
time_t detws_ntp_epoch()
Current Unix epoch seconds, or 0 if not yet synced (or disabled).
uint32_t ntp_time_source(void)
NTP as a time source for the multi-source registry (services/time_source).
bool detws_ntp_synced()
True once a plausible wall-clock time has been obtained from SNTP.
bool detws_ntp_begin(const char *tz=nullptr, const char *server1="pool.ntp.org", const char *server2="time.nist.gov")
Start the SNTP client.
size_t detws_ntp_http_date(char *out, size_t out_cap)
Format the current time as an RFC 7231 IMF-fixdate (HTTP Date).