In an old sketch, I use TimeLib with my own dayly NTP syncProvider function.
It works fine : now() returns epoch local time with DST adjustment.
However time(nullptr) always returns 0. I don't want another NTP sync for time().
How can I adjust the "internal" time() counter with the timestamp provided by now() ?
I have tried settimeofday() like this
Serial.println("time before " + String(time(nullptr)));
Serial.println("now " + String(now()));
struct timeval tv;
tv.tv_sec = now();
Serial.println("time after" + String(time(nullptr)));
without success time(nullptr) always returns 0
Thanks for your help,