Re: [PATCH 3/3] rtc: sh: set range

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, Mar 20, 2019 at 12:30 PM Alexandre Belloni
<alexandre.belloni@xxxxxxxxxxx> wrote:
> The SH RTC is a BCD RTC with some version having 4 digits for the year.
>
> The range for the RTCs with only 2 digits for the year was unfortunately
> shifted to handle 1999 to 2098.
>
> Signed-off-by: Alexandre Belloni <alexandre.belloni@xxxxxxxxxxx>

Reviewed-by: Geert Uytterhoeven <geert+renesas@xxxxxxxxx>

> --- a/include/linux/rtc.h
> +++ b/include/linux/rtc.h
> @@ -165,6 +165,7 @@ struct rtc_device {
>  #define RTC_TIMESTAMP_BEGIN_1900       -2208989361LL /* 1900-01-01 00:00:00 */

mktime64(1900, 1, 1, 0, 0, 0) = -2208988800 ??

Is this due to leap seconds, and mktime64() is valid for 1970 and later only?

Gr{oetje,eeting}s,

                        Geert

-- 
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@xxxxxxxxxxxxxx

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
                                -- Linus Torvalds



[Index of Archives]     [Linux Sound]     [ALSA Users]     [ALSA Devel]     [Linux Audio Users]     [Linux Media]     [Kernel]     [Gimp]     [Yosemite News]     [Linux Media]

  Powered by Linux