Managing Daylight Saving Time with ArduinoCloud (IoT)
Hello everyone,
I am currently developing an IoT application with an MKR WiFi 1010 board, in which I want to manage certain tasks based on the local time. When establishing the connection to "Arduino IoT Cloud," the board's RTC is updated with the local time retrieved from the network. However, this time corresponds to UTC and not UTC+1 (French local time in winter). Could you enlighten me on how to automatically update my RTC with the correct time (summer or winter)? Either by correcting it directly at the connection or afterwards.
The functions for connecting to Arduino Cloud are as follows:
The corresponding traces obtained on the serial link are:
Arduino IoT Cloud - configuration info
Device ID: (MASKED)
MQTT Broker: mqtts-sa.iot.arduino.cc:8883
WiFi.status(): 3
Current WiFi Firmware: 1.5.0
Connected to "SSID" (MASKED)
TimeServiceClass::sync Drift: -7 RTC value: 1699189163
Connected to Arduino IoT Cloud
Thing ID: (MASKED)
TimeServiceClass::setTimeZoneData offset: 3600 dst_until 1711846800
I am currently developing an IoT application with an MKR WiFi 1010 board, in which I want to manage certain tasks based on the local time. When establishing the connection to "Arduino IoT Cloud," the board's RTC is updated with the local time retrieved from the network. However, this time corresponds to UTC and not UTC+1 (French local time in winter). Could you enlighten me on how to automatically update my RTC with the correct time (summer or winter)? Either by correcting it directly at the connection or afterwards.
The functions for connecting to Arduino Cloud are as follows:
The corresponding traces obtained on the serial link are:
Arduino IoT Cloud - configuration info
Device ID: (MASKED)
MQTT Broker: mqtts-sa.iot.arduino.cc:8883
WiFi.status(): 3
Current WiFi Firmware: 1.5.0
Connected to "SSID" (MASKED)
TimeServiceClass::sync Drift: -7 RTC value: 1699189163
Connected to Arduino IoT Cloud
Thing ID: (MASKED)
TimeServiceClass::setTimeZoneData offset: 3600 dst_until 1711846800