Re: [patch] 2.4.0-test8: Alpha RTC clean-ups

From: Jan-Benedict Glaw (jbglaw@lug-owl.de)
Date: Fri Sep 22 2000 - 16:29:50 EST


On Fri, Sep 22, 2000 at 08:23:05PM +0200, Maciej W. Rozycki wrote:

Hi!

> + if (year >= 20 && year < 48)
[...]
> else if (year >= 48 && year < 70)
[...]
> - else if (year >= 70 && year < 100)
> - /* Digital DECstations, very old... */
> - epoch = 1928;

Instead of having hard-coded values, we should maybe do something
more variable like:
 if (year >= (20 + YEARS_SINCE_2000) && year < (48 + YEARS_SINCE_2000)
        ...

YEARS_SINCE_2000 could be define'd through (menu;x;...)config...

This applies to other platforms using different epoch vaules as
well, of course...

MfG, JBG

-- 
Fehler eingestehen, Größe zeigen: Nehmt die Rechtschreibreform zurück!!!
/* Jan-Benedict Glaw <jbglaw@lug-owl.de> -- +49-177-5601720 */
keyID=0x8399E1BB fingerprint=250D 3BCF 7127 0D8C A444 A961 1DBD 5E75 8399 E1BB
     "insmod vi.o and there we go..." (Alexander Viro on linux-kernel)


- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org Please read the FAQ at http://www.tux.org/lkml/



This archive was generated by hypermail 2b29 : Sat Sep 23 2000 - 21:00:28 EST