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

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

 



Hi Alexander,

On Fri, Mar 22, 2019 at 7:12 AM Alexandre Belloni
<alexandre.belloni@xxxxxxxxxxx> wrote:
> On 21/03/2019 11:22:26+0100, Geert Uytterhoeven wrote:
> > 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?
> >
>
> That's a bug, it seems I didn't use the correct timezone when doing the
> calculation. Thanks for spotting that, you can send a patch to correct
> it or I can do it.

Thanks for confirming, done.

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 Samsung SOC]     [Linux Wireless]     [Linux Kernel]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Samba]     [Device Mapper]

  Powered by Linux