* Other Arduino cores uses a macro to redefine libc abs() to take any
type, meaning abs(-3.3) == 3.3 not the normal libc result of 3.
* 1e4bf14a3 (#1783) replaced similar min, max macros with c++ stdlib. However
this change includes <algorithm> after the line which defines the abs() macro.
<algorithm> includes <cstdlib> which undefines abs() and re-defines it.
* This means abs() becomes the plain libc version again which only takes
integers, so abs(-3.3) == 3. As reported here:
https://github.com/espressif/esp-idf/issues/3405
This fix tries to keep in the spirit of #1783 by using libstdc++. The other
option would be to include <cstdlib> before defining the abs() macro, so it
doesn't get undef-ed again later on.
example:
```cpp
//done once on WiFi init
configTime(-7200, 3600, "pool.ntp.org");
//get local time
struct tm timeinfo;
if(!getLocalTime(&timeinfo)){
Serial.println("Failed to obtain time");
return;
}
//print time
Serial.println(&timeinfo);
//print time with different format
Serial.println(&timeinfo, "%A, %B %d %Y %H:%M:%S");
```
fixes: https://github.com/espressif/arduino-esp32/issues/29