lkml.org 
[lkml]   [2000]   [Sep]   [22]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [patch] 2.4.0-test8: Alpha RTC clean-ups
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)
[unhandled content-type:application/pgp-signature]
\
 
 \ /
  Last update: 2005-03-22 12:39    [W:0.048 / U:10.968 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site