From: Paul Eggert <eggert@cs.ucla.edu>
To: Glenn Morris <rgm@gnu.org>, Sam Steingold <sds@gnu.org>
Cc: 33380-done@debbugs.gnu.org
Subject: bug#33380: 27.0.50; Emacs hangs in current-time-zone
Date: Wed, 14 Nov 2018 14:26:50 -0800 [thread overview]
Message-ID: <c2b06115-5203-a9f0-d75e-5f6cbcbb843a@cs.ucla.edu> (raw)
In-Reply-To: <ettvkjcx55.fsf@fencepost.gnu.org>
[-- Attachment #1: Type: text/plain, Size: 297 bytes --]
On 11/14/18 10:49 AM, Glenn Morris wrote:
> A smaller example is to evaluate: (calendar-dst-starts 1962)
Thanks for the smaller example. I installed the attached patch into
master to fix that and am optimistically marking this bug as done. And
thanks, Sam, for reporting the original problem.
[-- Attachment #2: 0001-Fix-probing-for-pre-1970-DST.patch --]
[-- Type: text/x-patch, Size: 1087 bytes --]
From 917fe0d0383eabf621f59a7314882423bc12f74a Mon Sep 17 00:00:00 2001
From: Paul Eggert <eggert@Penguin.CS.UCLA.EDU>
Date: Wed, 14 Nov 2018 11:42:59 -0800
Subject: [PATCH] Fix probing for pre-1970 DST
* lisp/calendar/cal-dst.el (calendar-next-time-zone-transition):
Fix recently-introduced rounding bug when probing for DST
transitions before 1970 (Bug#33380).
---
lisp/calendar/cal-dst.el | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/lisp/calendar/cal-dst.el b/lisp/calendar/cal-dst.el
index 25264bda09..8392e81b16 100644
--- a/lisp/calendar/cal-dst.el
+++ b/lisp/calendar/cal-dst.el
@@ -154,7 +154,7 @@ calendar-next-time-zone-transition
(while
;; Set PROBE to halfway between LO and HI, rounding down.
;; If PROBE equals LO, we are done.
- (not (= lo (setq probe (/ (+ lo hi) 2))))
+ (not (= lo (setq probe (floor (+ lo hi) 2))))
;; Set either LO or HI to PROBE, depending on probe results.
(if (eq (car (current-time-zone probe)) hi-utc-diff)
(setq hi probe)
--
2.19.1
prev parent reply other threads:[~2018-11-14 22:26 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-11-14 14:22 bug#33380: 27.0.50; Emacs hangs in current-time-zone Sam Steingold
2018-11-14 18:49 ` Glenn Morris
2018-11-14 22:26 ` Paul Eggert [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=c2b06115-5203-a9f0-d75e-5f6cbcbb843a@cs.ucla.edu \
--to=eggert@cs.ucla.edu \
--cc=33380-done@debbugs.gnu.org \
--cc=rgm@gnu.org \
--cc=sds@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.