1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18
#ifndef SNTP_H #define SNTP_H #include <time.h> #include <sys/time.h> #include "esp_system.h" #include "esp_event.h" #include "esp_log.h" #include "esp_netif.h" #include "esp_netif_sntp.h" #include "esp_sntp.h" static const char *SNTP_TAG = "SNTP"; void set_tz(char* tz); void obtain_time(char t[4]); void sync_time(void); #endif