diff --git a/.github/workflows/compile-examples.yml b/.github/workflows/compile-examples.yml index a4e68ab0..4e286b9f 100644 --- a/.github/workflows/compile-examples.yml +++ b/.github/workflows/compile-examples.yml @@ -170,6 +170,7 @@ jobs: - name: arduino:mbed_portenta libraries: | - name: ArduinoECCX08 + - name: Arduino_Cellular sketch-paths: | - examples/ArduinoIoTCloud-DeferredOTA - examples/utility/Provisioning @@ -211,6 +212,8 @@ jobs: platforms: | # Install renesas_portenta platform via Boards Manager - name: arduino:renesas_portenta + libraries: | + - name: Arduino_Cellular sketch-paths: | - examples/utility/Provisioning # UNO R4 WiFi diff --git a/src/utility/time/TimeService.cpp b/src/utility/time/TimeService.cpp index 05290b21..5bf081de 100644 --- a/src/utility/time/TimeService.cpp +++ b/src/utility/time/TimeService.cpp @@ -292,9 +292,11 @@ unsigned long TimeServiceClass::getRemoteTime() * This is the most reliable time source and it will * ensure a correct behaviour of the library. */ - unsigned long const ntp_time = NTPUtils::getTime(_con_hdl->getUDP()); - if(isTimeValid(ntp_time)) { - return ntp_time; + if(_con_hdl->getInterface() != NetworkAdapter::CELL) { + unsigned long const ntp_time = NTPUtils::getTime(_con_hdl->getUDP()); + if(isTimeValid(ntp_time)) { + return ntp_time; + } } /* As fallback if NTP request fails try to obtain the