Date: Wed, 22 May 2002 08:40:19 +0300 (IDT) From: Eli Zaretskii X-Sender: eliz AT is To: djgpp AT delorie DOT com Subject: Re: mktime() for 1969 & 2106 In-Reply-To: Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII 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 Precedence: bulk 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.