www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1998/04/17/02:46:32

From: "John M. Aldrich" <fighteer AT cs DOT com>
Newsgroups: comp.os.msdos.djgpp
Subject: Re: getdate()
Date: Fri, 17 Apr 1998 00:13:46 -0400
Organization: Two pounds of chaos and a pinch of salt.
Lines: 26
Message-ID: <3536D6FA.64B@cs.com>
References: <eVzZ.3246$sN3 DOT 526143 AT news21 DOT bellglobal DOT com> <3536CBE7 DOT 3A55 AT cs DOT com> <54AZ.3256$sN3 DOT 534101 AT news21 DOT bellglobal DOT com> <3536D331 DOT 6C04 AT cs DOT com> <xAAZ.3279$sN3 DOT 557170 AT news21 DOT bellglobal DOT com>
NNTP-Posting-Host: ppp230.cs.com
Mime-Version: 1.0
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp

Paul Derbyshire wrote:
> 
> Didn't you just get through saying it wasn't ANSI??? *confused* If it is why is
> it in "dos.h"? *even more confused*

Remind me to concentrate on a single problem at a time.  :-)

The function you want is gmtime(), which returns a struct tm.  Syntax
example:

     time_t x;
     struct tm *t;
     time(&x);
     t = gmtime(&t);

Note also localtime(), which converts for time zones.  Both of these are
in the ANSI portion of time.h.  Did you see my second reply to your
question?

-- 
---------------------------------------------------------------------
|      John M. Aldrich       | "To be 'matter of fact' about the    |
|       aka Fighteer I       | world is to blunder into fantasy--   |
|   mailto:fighteer AT cs DOT com   | and dull fantasy at that, as the real|
| http://www.cs.com/fighteer | world is strange and wonderful." -LL |
---------------------------------------------------------------------

- Raw text -


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