delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/2002/05/22/02:25:54

Date: Wed, 22 May 2002 08:40:19 +0300 (IDT)
From: Eli Zaretskii <eliz AT is DOT elta DOT co DOT il>
X-Sender: eliz AT is
To: djgpp AT delorie DOT com
Subject: Re: mktime() for 1969 & 2106
In-Reply-To: <acf8gt$p1t4u$1@ID-79865.news.dfncis.de>
Message-ID: <Pine.SUN.3.91.1020522083735.15291B@is>
MIME-Version: 1.0
Reply-To: djgpp AT delorie DOT com
Errors-To: nobody AT delorie DOT com
X-Mailing-List: djgpp AT delorie DOT com
X-Unsubscribes-To: listserv AT delorie DOT com

On Wed, 22 May 2002, Alex Vinokur wrote:

> Are 'mktime() implementations on different platforms' essentially different ?

The borderline cases that you concentrate on are notoriously hard to get 
right, since the time-zone offset is not known until the exact local time 
is computed (timezone DST rules depend on local time), but the local time 
cannot be computed until you know the time-zone offset...

> Similar program on SunOS 5.6 with gcc 2.91.57 had no problem :
>   http://groups.google.com/groups?selm=7vrrsi%24ii8%241%40nnrp1.deja.com

Alas, the sources of the Solaris library aren't freely available, so we 
cannot get ideas from there.

If you are really disturbed by those border cases, look at the 
implementation in djtzs203.zip, it is better than what's in libc.a.

- Raw text -


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