Rolling 20210520

This commit is contained in:
jomjol
2021-05-20 21:58:37 +02:00
parent 9b791bb7a7
commit 528a4435a9
10 changed files with 35 additions and 5 deletions

View File

@@ -27,6 +27,17 @@ void time_sync_notification_cb(struct timeval *tv)
ESP_LOGI(TAG, "Notification of a time synchronization event");
}
std::string ConvertTimeToString(time_t _time, const char * frm)
{
struct tm timeinfo;
char strftime_buf[64];
localtime_r(&_time, &timeinfo);
strftime(strftime_buf, sizeof(strftime_buf), frm, &timeinfo);
std::string result(strftime_buf);
return result;
}
std::string gettimestring(const char * frm)
{
time_t now;