Files
AI-on-the-edge-device/code/components/jomjol_time_sntp/time_sntp.h
CaCO3 603e968ec7 Improve NTP handling (#1676)
* fix special case where number is named "default" (keep all topics in top level instead of in a sub-group)

* re-implemented SNTP usage, added way to disable NTP client, added timezone table

* minor fixes

Co-authored-by: CaCO3 <caco@ruinelli.ch>
2022-12-23 22:45:25 +01:00

29 lines
546 B
C++

#pragma once
#ifndef TIMESNTP_H
#define TIMESNTP_H
#include <string>
#include <time.h>
#include <sys/time.h>
#include "freertos/FreeRTOS.h"
#include "freertos/task.h"
#include "freertos/event_groups.h"
#include "esp_system.h"
#include "esp_event.h"
#include "esp_log.h"
#include "esp_attr.h"
#include "esp_sleep.h"
#include "esp_sntp.h"
std::string getCurrentTimeString(const char * frm);
std::string ConvertTimeToString(time_t _time, const char * frm);
bool getTimeIsSet(void);
bool getUseNtp(void);
bool setupTime();
#endif //TIMESNTP_H