delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp-workers/1997/04/10/18:54:37

Message-Id: <199704102249.SAA19108@delorie.com>
From: Oberhumer Markus <k3040e4 AT c210 DOT edvz DOT uni-linz DOT ac DOT at>
Subject: mktime() problem
To: djgpp-workers AT delorie DOT com (djgpp-workers)
Date: Fri, 11 Apr 1997 00:46:40 +0200 (METDST)
Return-Read-To: markus DOT oberhumer AT jk DOT uni-linz DOT ac DOT at
Mime-Version: 1.0

I've finally discovered the reason behind the mktime() problem
that was annoying me for quite a time - it prevented me from
rebuilding libc.

The problem is that valid DOS filestamps (like Apr 04 1995 02:22:40)
are not valid in my local timezone because the daylight saving gap
happens to be in exactly this hour. Other timezones probably
suffer the same problem at different times.

As a consequence of this mktime() returns -1 for these timestamps,
and when running 'make' it thinks that a file with such a timestamp
is non-existent.

mktime() could be modified to handle such (rare) situations by
returning the previous/next valid second in this case.

Comments ?

- Raw text -


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