Comments (2)
Thank for the bug report.
The fix will be as follows and will be introduced in the next release
bool rtc_set_datetime(DateTime dt)
{
datetime_t tm;
tm.year = dt.year();
tm.month = dt.month();
tm.day = dt.day();
tm.hour = dt.hour();
tm.min = dt.minute();
tm.sec = dt.second();
tm.dotw = dt.dayOfTheWeek();
#if RTC_DEBUG
Serial.print("Year = "); Serial.print(tm.year);
Serial.print(", Mo = "); Serial.print(tm.month);
Serial.print(", day = "); Serial.print(tm.day);
Serial.print(", hour = "); Serial.print(tm.hour);
Serial.print(", min = "); Serial.print(tm.min);
Serial.print(", sec = "); Serial.println(tm.sec);
#endif
return (rtc_set_datetime(&tm));
}
The Terminal output with the new bug fix
Start RP2040_RTC_Time_WiFiNINA on MBED NANO_RP2040_CONNECT with WiFiNINA using WiFiNINA_Generic Library
RP2040_RTC v1.0.6
Timezone_Generic v1.7.1
Connecting to WPA SSID: HueNet1
You're connected to the network, IP = 192.168.2.87
Packet received
Seconds since Jan 1 1900 = 3844779246
Unix time = 1635790446
The UTC time is 18:14:06
============================
18:14:07 Mon 01 Nov 2021 UTC
14:14:07 Mon 01 Nov 2021 EDT
============================
18:15:07 Mon 01 Nov 2021 UTC
14:15:07 Mon 01 Nov 2021 EDT
============================
18:16:07 Mon 01 Nov 2021 UTC
14:16:07 Mon 01 Nov 2021 EDT
============================
18:17:07 Mon 01 Nov 2021 UTC
14:17:07 Mon 01 Nov 2021 EDT
Could you please check and verify if there any more issue with PIO.
Thanks and regards
from rp2040_rtc.
Hi @maxgerhardt
The new RP2040_RTC releases v1.0.7 has just been published.
Your contribution has been noted in Contributions and Thanks
Releases v1.0.7
- Fix bug in rtc_set_datetime(). Check Library converts datetime_t incorrectly, causing example to fail #4
from rp2040_rtc.
Related Issues (5)
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from rp2040_rtc.