We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 6e92ddd commit 6c0be70Copy full SHA for 6c0be70
1 file changed
STM32F1/libraries/RTClock/src/RTClock.cpp
@@ -81,12 +81,16 @@
81
*/
82
83
void RTClock::setTime (time_t time_stamp) {
84
- breakTime(time_stamp, tmm); // time will be broken to tm
85
- setTime(tmm);
+ breakTime(time_stamp, tmm); // time will be broken to tmm
+ setTime(tmm);
86
//rtc_set_count(time_stamp);
87
}
88
89
- #define LEAP_YEAR(Y) ( ((1970+Y)>0) && !((1970+Y)%4) && ( ((1970+Y)%100) || !((1970+Y)%400) ) )
+ void RTClock::setTime (time_t time_stamp) {
90
+ rtc_set_count(time_stamp);
91
+ }
92
+
93
+#define LEAP_YEAR(Y) ( ((1970+Y)>0) && !((1970+Y)%4) && ( ((1970+Y)%100) || !((1970+Y)%400) ) )
94
95
//-----------------------------------------------------------------------------
96
void RTClock::breakTime(time_t timeInput, tm_t & tmm)
0 commit comments