Date: Sun, 15 Nov 1998 13:17:51 +0200 (IST) From: Eli Zaretskii X-Sender: eliz AT is To: Simon Vatche Chamlian cc: djgpp AT delorie DOT com Subject: Re: "localtime" Function In-Reply-To: <1998Nov12.184114est.185115-11305@seraph.uunet.ca> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII 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.