www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/2001/01/11/10:21:34

From: Hans-Bernhard Broeker <broeker AT physik DOT rwth-aachen DOT de>
Newsgroups: comp.os.msdos.djgpp
Subject: Re: It's about time()
Date: 11 Jan 2001 15:16:38 GMT
Organization: Aachen University of Technology (RWTH)
Lines: 20
Message-ID: <93kiom$ppd$1@nets3.rz.RWTH-Aachen.DE>
References: <3A5D0A33 DOT 1182 AT earthlink DOT net>
NNTP-Posting-Host: acp3bf.physik.rwth-aachen.de
X-Trace: nets3.rz.RWTH-Aachen.DE 979226198 26413 137.226.32.75 (11 Jan 2001 15:16:38 GMT)
X-Complaints-To: abuse AT rwth-aachen DOT de
NNTP-Posting-Date: 11 Jan 2001 15:16:38 GMT
Originator: broeker@
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp
Reply-To: djgpp AT delorie DOT com

Joe Wright <joewwright AT earthlink DOT net> wrote:

> Is there some setup thing such that localtime() reports the system
> clock, tm_zone is "EST" and gmtime() is five hours later?

set 'TZ' --> see Eli's reply.

> Do you know why...
[...]
> - tm_mday is the only rel-1 value in struct tm.  All others are rel-0.

In a nutshell, all fields except tm_month keep their normal, everyday
numerical definition, which already is zero-based. tm_month and
tm_wday are the exceptions, because they will often be used as an
index in an array of names and arrays are zero-based in C.  tm_mday is
a purely numerical value, so there's no point changing it's every day
one-based counting to zero-based.
-- 
Hans-Bernhard Broeker (broeker AT physik DOT rwth-aachen DOT de)
Even if all the snow were burnt, ashes would remain.

- Raw text -


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