Hi,


>
> > Hi,
> >
> > I've a problem with the real-time clock. It detects digital unix epoch 1952,
> > but sets
> > my clock to year 2052 (even if SRM says 2000)!
> > Any idea ?
> yes, it seems to be something like a y2k-bug ...
>
> it's got to be close to these
>
> from linux-2.2.14/arch/alpha/kernel/time.c:309
> [...]
>         if ((year += 1900) < 1970)
>                 year += 100;
>         xtime.tv_sec = mktime(year, mon, day, hour, min, sec);
>         xtime.tv_usec = 0;
> [...]
>
> from linux-2.2.14/drivers/char/rtc.c:
> [...]
> static unsigned long epoch = 1900;      /* year corresponding to 0x00   */
> [...]
>         if (year > 10 && year < 44) {
>                 epoch = 1980;
>                 guess = "ARC console";
>         } else if (year < 96) {
>                 epoch = 1952;
>                 guess = "Digital UNIX";
>         }
> [...]
>
> --

It's not only a Y2K-bug it seems to be a little bit bigger.
After shutting down linux and booting Tru Unix, there are some problems with
setting the
time. I think the linux rtc and time routines screw up the TOY (time of year)
chip infos,
because TRU Unix complains about that.
If you have Tru Unix available, have a look in the kernel include files,
there are some hints.

Regards


Sven


Reply via email to