Henrik Westrell <hen...@er...> writes:
> Hi
>
> Does someone know if there are any
> Y2K issues with Modules ?????
>
> ( We are using Modules version 2.2. )
I don't know about 2.2, but I took a quick look at the 3.0beta
sources. I can only find one place where it mangles time related
data: print_aligned_files(), in ModuleCmd_Avail.c.
And indeed, there is a small bug, the module avail display will be
incorrect for module files modified after 01/01/2000. The affected
code is in ModuleCmd_Avail.c around line 1600:
if((struct tm *) NULL != (tm = gmtime( &stats.st_mtime))) {
sprintf( buffer, "%02d/%02d/%02d %2d:%02d:%02d",
tm->tm_year, tm->tm_mon + 1, tm->tm_mday, tm->tm_hour,
tm->tm_min, tm->tm_sec);
timestr = buffer;
Changing tm->tm_year to tm->tm_year%100, or better yet,
tm->tm_year+1900 should take care of this.
The rest of the stuff looks good to me, if it's not then I will fix it
on 01/01/2000 before the lusers come in to work :)
--
Istvan
|