Quantcast
Channel: Raspberry Pi Forums
Viewing all articles
Browse latest Browse all 8374

General • Problem with Pico's RTC, daylight saving time, and daytime_t

$
0
0
I use a PICO to control the input to my audio amplifier: radio over the day, TV from 7:58 pm.
The RTC is initialized once at boot time using date +"%Y %m %d %u %H %M %S" as reported earlier.
This worked fine till end of February. On March 1st suddenly the switching occured one hour earlier.
The PICO has got no access to the internet. So it seems to understand daylight saving time.
But I know of no country where the time change occurs on March 1st.
Could it be that the RTC counts months from 0, though pico-sdk/src/common/pico_base/include/pico/types.h
says "int8_t month; ///< 1..12, 1 is January" in the daytime_t definition?
Btw, the day of the week starts with 0 for Sunday wheras for the bash date command Sunday is 1.

Statistics: Posted by ulrichmuc — Sun Mar 03, 2024 12:43 pm



Viewing all articles
Browse latest Browse all 8374

Trending Articles