]> git.eshelyaron.com Git - emacs.git/commitdiff
Fix daylight-saving inference for Irish time
authorPaul Eggert <eggert@cs.ucla.edu>
Fri, 8 Dec 2017 20:11:25 +0000 (12:11 -0800)
committerPaul Eggert <eggert@cs.ucla.edu>
Fri, 8 Dec 2017 20:12:39 +0000 (12:12 -0800)
* lisp/calendar/cal-dst.el (calendar-dst-find-data): Do not assume
that daylight-saving time has a greater UT offset than standard
time.  The reverse is true in Ireland, where standard time "IST"
is UTC +01 in summer and daylight-saving time "GMT" is UTC +00 in
winter.  The current Irish rules are given by the POSIX setting
TZ='IST-1GMT0,M10.5.0,M3.5.0/1'.

lisp/calendar/cal-dst.el

index 6b55ea479f18259744b2119462c0dbfc4ae1e5ae..5b7f3127a6e5cea5aab25529d96340742059bd3c 100644 (file)
@@ -280,14 +280,11 @@ for `calendar-current-time-zone'."
                             (car t2-date-sec) t1-utc-diff))
                  (t1-time (/ (cdr t1-date-sec) 60))
                  (t2-time (/ (cdr t2-date-sec) 60)))
-            (cons
-             (/ (min t0-utc-diff t1-utc-diff) 60)
-             (cons
-              (/ (abs (- t0-utc-diff t1-utc-diff)) 60)
-              (if (< t0-utc-diff t1-utc-diff)
-                  (list t0-name t1-name t1-rules t2-rules t1-time t2-time)
-                (list t1-name t0-name t2-rules t1-rules t2-time t1-time)
-                )))))))))
+            (if (nth 7 (decode-time t1))
+                (list (/ t0-utc-diff 60) (/ (- t1-utc-diff t0-utc-diff) 60)
+                      t0-name t1-name t1-rules t2-rules t1-time t2-time)
+              (list (/ t1-utc-diff 60) (/ (- t0-utc-diff t1-utc-diff) 60)
+                    t1-name t0-name t2-rules t1-rules t2-time t1-time))))))))
 
 (defvar calendar-dst-transition-cache nil
   "Internal cal-dst variable storing date of daylight saving time transitions.