www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1998/11/12/18:42:36

From: Simon Vatche Chamlian <simon AT mpbtech DOT qc DOT ca>
To: djgpp AT delorie DOT com
Date: Thu, 12 Nov 1998 15:00:52 -0500
MIME-Version: 1.0
Subject: "localtime" Function
X-mailer: Pegasus Mail for Windows (v2.42a)
Message-Id: <1998Nov12.184114est.185115-11305@seraph.uunet.ca>
Reply-To: djgpp AT delorie DOT com

Hi,

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.

Anybody had this problem? Any clue on how to fix it?

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. Therefore, it's valid up until the year 2037. So I would like to change the typedef for "time_t" from "long" to "unsigned long".
I was just wondering if anybody did the job already (I'm feeling lazy)?



Thanks in advance.

-SImon




- Raw text -


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