IUBio

Y2K and SRS

Guy Bottu gbottu at bigben.vub.ac.be
Tue Jan 4 06:33:38 EST 2000


	Dear fellow SRS server managers,

The much discussed Y2K bug has hit SRS. SRS 5 servers display that certain
databank has been indexed on 03-Jan-19100. This is not a great problem, since
it does not interfere with the functionality of the software. I found a fix :

in SRSROOT/src/tm.c replace 

  case 's':  /* short */
    sprintf (timeStr, "%0d/%0d/%0d", timeRec->tm_mon+1,
                                  timeRec->tm_mday,
                                  timeRec->tm_year);
    break;
  case 'l':  /* long */
    sprintf (timeStr, "%02d-%s-19%0d %02d:%02d", timeRec->tm_mday,
             month[timeRec->tm_mon],
             timeRec->tm_year,
             timeRec->tm_hour,
             timeRec->tm_min);
    break;
  case 'd':  /* date */
    sprintf (timeStr, "%02d-%s-19%0d", timeRec->tm_mday,
             month[timeRec->tm_mon],
             timeRec->tm_year);

by :

  case 's':  /* short */
    if (timeRec->tm_year >= 100)
      sprintf (timeStr, "%0d/%0d/%0d", timeRec->tm_mon+1,
                                  timeRec->tm_mday,
                                  timeRec->tm_year + 1900);
    else
      sprintf (timeStr, "%0d/%0d/%0d", timeRec->tm_mon+1,
                                  timeRec->tm_mday,
                                  timeRec->tm_year);
    break;
  case 'l':  /* long */
    sprintf (timeStr, "%02d-%s-%0d %02d:%02d", timeRec->tm_mday,
             month[timeRec->tm_mon],
             timeRec->tm_year + 1900,
             timeRec->tm_hour,
             timeRec->tm_min);
    break;
  case 'd':  /* date */
    sprintf (timeStr, "%02d-%s-%0d", timeRec->tm_mday,
             month[timeRec->tm_mon],
             timeRec->tm_year + 1900);

and do the necessary :
 srsinstall make
 srsmake wgetz

I have heard that in the meantime J. Valverde found a very similar fix too.

	Sincerely yours,
	  Guy Bottu,
	    BEN





More information about the Bio-srs mailing list

Send comments to us at biosci-help [At] net.bio.net