cvs.gedasymbols.org/archives/browse.cgi   search  
Mail Archives: djgpp/1999/08/01/23:08:06

Date: Sun, 1 Aug 1999 23:07:22 -0400 (EDT)
Message-Id: <1.5.4.16.19990801230707.337fc54a@erie.net>
X-Sender: calculs2 AT erie DOT net
X-Mailer: Windows Eudora Light Version 1.5.4 (16)
Mime-Version: 1.0
To: djgpp AT delorie DOT com
From: Rich <calculs2 AT erie DOT net>
Subject: comp.os.msdos.djgpp.beginner
Reply-To: djgpp AT delorie DOT com

I propose, in the interest of avoid harse comments from the more
"seasoned" C/C++ users, that perhaps we should create a NEW
newsgroup
               comp.os.msdos.djgpp.beginner
and they in there, new comers can be treated with the proper
respect due them.

I still would like to see a working example of    strftime
since I haven't been successful getting the LIBC.hlp
example to work for me yet.

/* This DJGPP program PROPERLY displays the
   Current Date/Time (as set by the PC's system time).

NOTE: I still have NO WORKING EXAMPLE of how to do this
	  using 'strftime';  if you have a WORKING example
      example for   strftime, I would be happy to test
	  it.
*/		

#include <stdio.h>
#include <string.h>
#include <time.h>

 time_t now;

int main(void) {
char buf[100];

 time(&now);
 strcpy( buf, asctime(localtime(&now)) );

printf("The current date/time is %s", buf );

}

/* Outputs:
     The Current Date/Time is: Aug 1 22:59:56 1999
(which was correct at "that" time, hehe)	
*/

- Raw text -


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