www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1999/02/04/05:40:56

From: "Hagbart Data" <hagbartdata AT post DOT tele DOT dk>
Newsgroups: comp.os.msdos.djgpp
Subject: Re: How to get the current system time?
Date: Thu, 4 Feb 1999 09:56:38 +0100
Lines: 35
Message-ID: <79bncf$14se$1@news-inn.inet.tele.dk>
References: <36b9209f DOT 0 AT nsuxnews>
NNTP-Posting-Host: ip31.hinxr1.ras.tele.dk
X-Trace: news-inn.inet.tele.dk 918118607 37774 (None) 195.249.198.31 (04-02-99 08:56:47 GMT)
X-Newsreader: Microsoft Outlook Express 4.72.3110.5
X-MimeOLE: Produced By Microsoft MimeOLE V4.72.3110.3
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp
Reply-To: djgpp AT delorie DOT com

Try this:
.
#include <time.h>
.
.
.


int main( int argc, char *argv[])

{
 time_t                clock;

 time(&clock);

 printf ("programnavn = %s   %.24s\n",argv[0],&ctime(&clock)[0]);

}



Y.K. Goh skrev i meddelelsen <36b9209f DOT 0 AT nsuxnews>...
>
>How do I get the current system time and date?
>
>Thanks in advance.
>------------------------------
>Yong-Kwang Goh
>Ngee Ann Polytechnic
>The Centre for Computer Studies
>
>Email: s6606555 AT np DOT edu DOT sg
>------------------------------


- Raw text -


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