delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp-workers/2000/09/29/13:28:16

From: Martin Str|mberg <ams AT ludd DOT luth DOT se>
Message-Id: <200009291728.TAA24015@father.ludd.luth.se>
Subject: djasm and Y2K...
To: djgpp-workers AT delorie DOT com (DJGPP-WORKERS)
Date: Fri, 29 Sep 2000 19:28:06 +0200 (MET DST)
X-Mailer: ELM [version 2.4ME+ PL54 (25)]
MIME-Version: 1.0
Reply-To: djgpp-workers AT delorie DOT com

I'm seeing this in the stub:
$Id: stub.asm built 09/26/100 18:44:19 by djasm $
^M
@(#) stub.asm built 09/26/100 18:44:19 by djasm
^M

Ooops!

This is the guilty code in djasm.y:
void add_rcs_ident(char *buf)
{
  char tmp[500];
  time_t now;
  struct tm *tm;
  time(&now);
  tm = localtime(&now);
  sprintf(tmp, "%cId: %s built %02d/%02d/%02d %02d:%02d:%02d by djasm $\n",
          '$', inname,
          tm->tm_mon + 1,
          tm->tm_mday,
          tm->tm_year,
          tm->tm_hour,
          tm->tm_min,
          tm->tm_sec);
  add_copyright(tmp);
  sprintf(tmp, "@(#) %s built %02d/%02d/%02d %02d:%02d:%02d by djasm\n",
          inname,
          tm->tm_mon + 1,
          tm->tm_mday,
          tm->tm_year,
          tm->tm_hour,
          tm->tm_min,
          tm->tm_sec);
  add_copyright(tmp);
}

Shall we go to four digits or subract 100?

While we are talking about this piece: could we change the MM/DD/YY
format to YY/MM/DD or YY-MM-DD which every sane person should use
(hello Americans...)?


Right,

						MartinS

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019