-->
Page 3 of 3

Re: Can't set time despite sending ESP8266 seconds since epo

PostPosted: Sat Nov 27, 2021 2:35 am
by JurajA
what I am saying
this is wrong:
Code: Select alltime_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 alltime_t rtc = atol(buf)

so convert the string to a number