Convert NTP time to integer

You don't need to "convert" anything. Calling time(nullptr) on an ESP32 will return the epoch time as a 64-bit signed integer:

   time_t now = time(nullptr);
1 Like