добавил получение времени NTP

This commit is contained in:
Dmitry Borisenko
2022-08-18 14:49:11 +02:00
parent ff5b9e8a9b
commit b458758a54
9 changed files with 160 additions and 167 deletions

13
include/NTP.h Normal file
View File

@@ -0,0 +1,13 @@
#pragma once
#include "Arduino.h"
#include "Global.h"
static const uint8_t days_in_month[] = {31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31};
extern void breakEpochToTime(unsigned long epoch, Time_t& tm);
extern void ntpInit();
extern time_t getSystemTime();
extern void synchTime();
extern const String getTimeLocal_hhmm();
extern const String getTimeLocal_hhmmss();
extern const String getDateTimeDotFormated();