You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
how it can convert here
_yearFrom2000((year >= c_OriginYear) ? year - c_OriginYear : year),
1970 for ex, to uint8_t type?
And how can this library at all work correct with data until 2000?
My DS3231 battery is down, when time is readed it correctly returns 1970... zero unix-time, but this RtcDateTime library can't correctly give it to me.
And code in 'DS3231_Simple.ino' fails too in this case:
RtcDateTime now = Rtc.GetDateTime();
if (now < compiled)
The text was updated successfully, but these errors were encountered:
This is by design. These are meant to track current time from a hardware Real Time Clock.
The DS3231 hardware itself cannot even support years before 2000. It stores it as a two digit year offset from 2000. So I have no idea where you get support for 1970 from.
Why all these new modern libraries use new format 'since 2000 year'? Most of all old hardware still uses unix-time format 'since 1970..'.
test code that fails:
RtcDateTime test = RtcDateTime(1970, 1, 1, 1, 1, 1);
in RtcDateTime.h:
RtcDateTime(uint16_t year,
uint8_t month,
uint8_t dayOfMonth,
uint8_t hour,
uint8_t minute,
uint8_t second) :
_yearFrom2000((year >= c_OriginYear) ? year - c_OriginYear : year),
how it can convert here
_yearFrom2000((year >= c_OriginYear) ? year - c_OriginYear : year),
1970 for ex, to uint8_t type?
And how can this library at all work correct with data until 2000?
My DS3231 battery is down, when time is readed it correctly returns 1970... zero unix-time, but this RtcDateTime library can't correctly give it to me.
And code in 'DS3231_Simple.ino' fails too in this case:
RtcDateTime now = Rtc.GetDateTime();
if (now < compiled)
The text was updated successfully, but these errors were encountered: