Date: Sun, 1 Aug 1999 22:21:22 -0400 (EDT) Message-Id: <1.5.4.16.19990801222107.337fe474@erie.net> X-Sender: calculs2 AT erie DOT net X-Mailer: Windows Eudora Light Version 1.5.4 (16) Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" To: djgpp AT delorie DOT com From: Rich Subject: Printing the PROPER current Date/Time Reply-To: djgpp AT delorie DOT com /* getting DJGPP to print out a formatted Date/Time string (ie, like Borlands lazy strdate() and strtime()) */ #include #include #include #include struct tm *time_now; time_t secs_now; //Copied from LIBC.HLP file. /* time_t mktime(struct tm *tptr); */ /* time_t time(time_t *t); */ /* struct tm *localtime(const time_t *tod); */ int main(int argc, char **argv) { char buf[100]; time_now = localtime(&secs_now); strftime(buf, 100, "%B %d, %Y", time_now); printf("%s\n", buf); } ------------------ Outputs: January 01, 1970 ------------------ How do I get a PROPER Date/Time (like from the system clock)?