time sync notification (#1442)

* add on_time_sync trigger

* cleanup lint

* fix review remark (sntp didn't trigger callbacks)
This commit is contained in:
Florian Mösch
2021-01-18 09:34:50 -03:00
committed by GitHub
parent d9a2651a5a
commit 4c105398f7
8 changed files with 34 additions and 6 deletions
@@ -38,6 +38,8 @@ void RealTimeClock::synchronize_epoch_(uint32_t epoch) {
char buf[128];
time.strftime(buf, sizeof(buf), "%c");
ESP_LOGD(TAG, "Synchronized time: %s", buf);
this->time_sync_callback_.call();
}
size_t ESPTime::strftime(char *buffer, size_t buffer_len, const char *format) {