From: Paul Eggert Date: Fri, 8 Dec 2017 20:11:25 +0000 (-0800) Subject: Fix daylight-saving inference for Irish time X-Git-Tag: emacs-27.0.90~6077 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=ff105b366c2477976948772822d3f5303121b9d5;p=emacs.git Fix daylight-saving inference for Irish time * 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'. --- diff --git a/lisp/calendar/cal-dst.el b/lisp/calendar/cal-dst.el index 6b55ea479f1..5b7f3127a6e 100644 --- a/lisp/calendar/cal-dst.el +++ b/lisp/calendar/cal-dst.el @@ -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.