emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] master ff105b3: Fix daylight-saving inference for Irish ti


From: Paul Eggert
Subject: [Emacs-diffs] master ff105b3: Fix daylight-saving inference for Irish time
Date: Fri, 8 Dec 2017 15:12:45 -0500 (EST)

branch: master
commit ff105b366c2477976948772822d3f5303121b9d5
Author: Paul Eggert <address@hidden>
Commit: Paul Eggert <address@hidden>

    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'.
---
 lisp/calendar/cal-dst.el | 13 +++++--------
 1 file changed, 5 insertions(+), 8 deletions(-)

diff --git a/lisp/calendar/cal-dst.el b/lisp/calendar/cal-dst.el
index 6b55ea4..5b7f312 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.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]