Re: Can't set time despite sending ESP8266 seconds since epo
Posted: Sat Nov 27, 2021 2:35 am
what I am saying
this is wrong:
you use as time the pointer to a string with digits of the timestamp
it should be something like
so convert the string to a number
this is wrong:
Code: Select all
time_t rtc = (uint32_t)buf
you use as time the pointer to a string with digits of the timestamp
it should be something like
Code: Select all
time_t rtc = atol(buf)
so convert the string to a number