www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1998/11/15/06:30:40

Date: Sun, 15 Nov 1998 13:17:51 +0200 (IST)
From: Eli Zaretskii <eliz AT is DOT elta DOT co DOT il>
X-Sender: eliz AT is
To: Simon Vatche Chamlian <simon AT mpbtech DOT qc DOT ca>
cc: djgpp AT delorie DOT com
Subject: Re: "localtime" Function
In-Reply-To: <1998Nov12.184114est.185115-11305@seraph.uunet.ca>
Message-ID: <Pine.SUN.3.91.981115131732.1381X-100000@is>
MIME-Version: 1.0
Reply-To: djgpp AT delorie DOT com

On Thu, 12 Nov 1998, Simon Vatche Chamlian wrote:

> I was using DJGPP's "localtime" function and to my great surprise,
> "localtime" returns a time 5 hours greater then the time set on the
> PC. I presume this is due because there is no correction done due to
> the time zone and daylight saving time.

Do you have a TZ variable set in the environment?  If so, it probably
is not in a form that is compatible with Posix TZ format used by
DJGPP.  Post here the details of your TZ setting, if you want this
resolved.

> On another subject, the reason I was trying to tackle this function
> is because "time_t" is declared as "long" in the ANSI C
> library.

AFAIK, ANSI never specifies what time_t should be, except that it
should be an arithmetic type; it's entirely up to the implementation
to providfe whatever typedef it sees fit.

- Raw text -


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