]> sourceware.org Git - glibc.git/commitdiff
Update.
authorUlrich Drepper <drepper@redhat.com>
Tue, 3 Nov 1998 15:49:43 +0000 (15:49 +0000)
committerUlrich Drepper <drepper@redhat.com>
Tue, 3 Nov 1998 15:49:43 +0000 (15:49 +0000)
1998-11-03  Ulrich Drepper  <drepper@cygnus.com>

* time/mktime.c (__mktime_internal): Handle broken down times
around the time of the DST switches more correctly.

1998-11-02  Andreas Jaeger  <aj@arthur.rhein-neckar.de>

        * sysdeps/unix/sysv/linux/netatalk/at.h: Include <linux/atalk.h>
        before <sys/socket.h> to make sockaddr_at available to
        <sys/socket.h>.

1998-11-02  Andreas Jaeger  <aj@arthur.rhein-neckar.de>

* time/tzset.c (tz_compute): Remove unused parameter timer.
Change caller.

1998-11-02  Mark Kettenis  <kettenis@phys.uva.nl>

* sysdeps/generic/bits/types.h (__ipc_pid_t): New typedef.

ChangeLog
time/mktime.c

index 0e0275ff6196bf2e4c8771b097c9a17626e6c45f..47b39e318a76cc3dde6021a3f1bbdf6d030099df 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+1998-11-03  Ulrich Drepper  <drepper@cygnus.com>
+
+       * time/mktime.c (__mktime_internal): Handle broken down times
+       around the time of the DST switches more correctly.
+
 1998-11-02  Ulrich Drepper  <drepper@cygnus.com>
 
        * elf/Makefile (libdl-routines): Add dlopenold.
        * sysdeps/unix/sysv/linux/i386/sysdep.h: Add .L prefix to symbols
        used in macro magic.
 
-1998-11-02  Andreas Jaeger  <aj@arthur.rhein-neckar.de> 
-        * sysdeps/unix/sysv/linux/netatalk/at.h: Include <linux/atalk.h> 
-        before <sys/socket.h> to make sockaddr_at available to 
-        <sys/socket.h>. 
+1998-11-02  Andreas Jaeger  <aj@arthur.rhein-neckar.de>
+
+        * sysdeps/unix/sysv/linux/netatalk/at.h: Include <linux/atalk.h>
+        before <sys/socket.h> to make sockaddr_at available to
+        <sys/socket.h>.
 
        * posix/glob.h: Remove __P from parameter lists of declarations.
-1998-11-02  Andreas Jaeger  <aj@arthur.rhein-neckar.de> 
-       * time/tzset.c (tz_compute): Remove unused parameter timer. 
-       Change caller. 
-1998-11-02  Mark Kettenis  <kettenis@phys.uva.nl> 
-       * sysdeps/generic/bits/types.h (__ipc_pid_t): New typedef. 
+
+1998-11-02  Andreas Jaeger  <aj@arthur.rhein-neckar.de>
+
+       * time/tzset.c (tz_compute): Remove unused parameter timer.
+       Change caller.
+
+1998-11-02  Mark Kettenis  <kettenis@phys.uva.nl>
+
+       * sysdeps/generic/bits/types.h (__ipc_pid_t): New typedef.
+
 1998-11-02  Ulrich Drepper  <drepper@cygnus.com>
 
        * sysdeps/unix/sysv/linux/i386/setgroups.c (setgroups): Remove
index 0fa92e0e65c1260d5e9c9967083a9d9461aca5b6..6135d70bd67a5a008fc72862cc1b8f2de6d91d0b 100644 (file)
@@ -350,29 +350,44 @@ __mktime_internal (tp, convert, offset)
 
   /* If we have a match, check whether tm.tm_isdst has the requested
      value, if any.  */
-  if (dt == 0 && 0 <= isdst && 0 <= tm.tm_isdst)
+  if (dt == 0 && isdst >= 0 && isdst != tm.tm_isdst)
     {
       int dst_diff = (isdst != 0) - (tm.tm_isdst != 0);
       if (dst_diff)
        {
-         /* Move two hours in the direction indicated by the disagreement,
+         /* Move three hours in the direction indicated by the disagreement,
             probe some more, and switch to a new time if found.
             The largest known fallback due to daylight savings is two hours:
-            once, in Newfoundland, 1988-10-30 02:00 -> 00:00.  */
-         time_t ot = t - 2 * 60 * 60 * dst_diff;
+            once, in Newfoundland, 1988-10-30 02:00 -> 00:00.
+            But some programs (e.g. testsuites) probe for larger differences
+            between DST and normal time so switch by three hours.  No
+            normal program does this so we do not account for more than
+            three hours difference.  */
+         time_t ot = t - 3 * 60 * 60 * dst_diff;
+         struct tm otm;
+         struct tm tmptm;
+
+         otm.tm_isdst = -1;
+
          while (--remaining_probes != 0)
            {
-             struct tm otm;
              if (! (dt = ydhms_tm_diff (year, yday, hour, min, sec,
-                                        ranged_convert (convert, &ot, &otm))))
-               {
-                 t = ot;
-                 tm = otm;
-                 break;
-               }
-             if ((ot += dt) == t)
+                                        ranged_convert (convert, &ot,
+                                                        &tmptm)))
+                 || tmptm.tm_isdst != isdst)
+               break;
+
+             otm = tmptm;
+             ot += dt;
+             if (ot == t)
                break;  /* Avoid a redundant probe.  */
            }
+
+         if (otm.tm_isdst != -1)
+           {
+             t = ot;
+             tm = otm;
+           }
        }
     }
 
This page took 0.052262 seconds and 5 git commands to generate.