3 ms·
So is the Rockchip device counting incorrectly, or is someone actually proposing there is something specifically wrong with the Gregorian calendar? Without any
by plorg 11y ago
So is the Rockchip device counting incorrectly, or is someone actually proposing there is something specifically wrong with the Gregorian calendar? Without any other Google results for "Rockchip calendar" I'm assuming it's the former, but if so the level of snark is a bit difficult to read through and the post doesn't make much of a differentiation between the hardware and the calendar model used to correct for its error.
- yuhong 11y agoI think it is just a hardware bug that they make jokes out of.
- rzzzt 11y agoNovember has 30 days, while the chip's real-time clock counts to 31 days in that month. Some additional commentary can be found on LKML [1]. [1] https://lkml.org/lkml/2015/12/2/1202 https://lkml.org/lkml/2015/12/2/1202
- jsudhams 11y agoBut in this link isn't code setting day to Nov 1 when it hits Oct 31? Am i reading some wrong? if (tm->tm_mon == 10 && tm->tm_mday == 31) { dev_warn(dev, "correcting Nov 31st to Dec 1st (HW bug)\n"); tm->tm_mon = 11; tm->tm_mday = 1; rk808_rtc_set_time(dev, tm); }
- rahimnathwani 11y agoMaybe they start counting months at zero.
- Someone 11y agohttp://www.cplusplus.com/reference/ctime/tm/ http://www.cplusplus.com/reference/ctime/tm/: Member Type Meaning Range tm_sec int seconds after the minute 0-61* tm_min int minutes after the hour 0-59 tm_hour int hours since midnight 0-23 tm_mday int day of the month 1-31 tm_mon int months since January 0-11 tm_year int years since 1900 tm_wday int days since Sunday 0-6 tm_yday int days since January 1 0-365 tm_isdst int Daylight Saving Time flag
- gpvos 11y agoThanks for that link. The discussion and the different attempted solutions are fascinating.
- geofft 11y agoThe snark is extremely dry, so it is entirely reasonable to have misunderstood it. But the effect of adding an unconditional day to November would be to increase the year to 366 days (and 367 on leap years), which even the ancients knew was totally wrong. And the effect of adding a day to November and take it from e.g. December is just to affect how we do human accounting; there's no astronomical concept of December 1 that needs to line up with anything.