From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Mattias =?UTF-8?Q?Engdeg=C3=A5rd?= Newsgroups: gmane.emacs.bugs Subject: bug#44237: 28.0.50; Incorrect sunrise time for two days around 31st December 2020 Date: Mon, 26 Oct 2020 19:26:47 +0100 Message-ID: References: Mime-Version: 1.0 (Mac OS X Mail 12.4 \(3445.104.17\)) Content-Type: multipart/mixed; boundary="Apple-Mail=_2D5E9497-A742-4FB7-A33B-4B7D8683EAA2" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="3126"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 44237@debbugs.gnu.org To: Pankaj Jangid Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Mon Oct 26 19:31:34 2020 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1kX7HK-0000hP-As for geb-bug-gnu-emacs@m.gmane-mx.org; Mon, 26 Oct 2020 19:31:34 +0100 Original-Received: from localhost ([::1]:54938 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kX7HJ-0008UE-A2 for geb-bug-gnu-emacs@m.gmane-mx.org; Mon, 26 Oct 2020 14:31:33 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:40414) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kX7Cw-0004c0-W4 for bug-gnu-emacs@gnu.org; Mon, 26 Oct 2020 14:27:03 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:58003) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1kX7Cw-0000ym-Jt for bug-gnu-emacs@gnu.org; Mon, 26 Oct 2020 14:27:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1kX7Cw-0004Ea-H7 for bug-gnu-emacs@gnu.org; Mon, 26 Oct 2020 14:27:02 -0400 X-Loop: help-debbugs@gnu.org In-Reply-To: Resent-From: Mattias =?UTF-8?Q?Engdeg=C3=A5rd?= Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 26 Oct 2020 18:27:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 44237 X-GNU-PR-Package: emacs Original-Received: via spool by 44237-submit@debbugs.gnu.org id=B44237.160373681916260 (code B ref 44237); Mon, 26 Oct 2020 18:27:02 +0000 Original-Received: (at 44237) by debbugs.gnu.org; 26 Oct 2020 18:26:59 +0000 Original-Received: from localhost ([127.0.0.1]:41315 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kX7Ct-0004EC-B7 for submit@debbugs.gnu.org; Mon, 26 Oct 2020 14:26:59 -0400 Original-Received: from mail1433c50.megamailservers.eu ([91.136.14.33]:40722 helo=mail263c50.megamailservers.eu) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kX7Cr-0004Dw-Hj for 44237@debbugs.gnu.org; Mon, 26 Oct 2020 14:26:58 -0400 X-Authenticated-User: mattiase@bredband.net DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=megamailservers.eu; s=maildub; t=1603736810; bh=sgHc3gp4T9VRCTvBKaBHNO/ysYfBS08VpFO+ejWGH9U=; h=From:Subject:Date:Cc:To:From; b=P0LKgx70/Ynk5Kbq0bpTYmUPqnbotN2SjEM+qCwlJ9h/dMcrBnAiayD+zO4aUwYIR OAqG3cON6CFHZ1hiKh6RFSWXDgsStRNwYfM4Pp7OivqqLogKkvS8HVyWynVBXHycZK I1JmfqbbL0jPLJqhQ5Lqn0aliDBLQcFE8qnJGwcA= Feedback-ID: mattiase@acm.or Original-Received: from stanniol.lan (c-304ee655.032-75-73746f71.bbcust.telenor.se [85.230.78.48]) (authenticated bits=0) by mail263c50.megamailservers.eu (8.14.9/8.13.1) with ESMTP id 09QIQmcd009599; Mon, 26 Oct 2020 18:26:49 +0000 X-Mailer: Apple Mail (2.3445.104.17) X-CTCH-RefID: str=0001.0A782F18.5F9714EA.0052:SCFSTAT76743386, ss=1, re=-4.000, recu=0.000, reip=0.000, cl=1, cld=1, fgs=0 X-CTCH-VOD: Unknown X-CTCH-Spam: Unknown X-CTCH-Score: -4.000 X-CTCH-Flags: 0 X-CTCH-ScoreCust: 0.000 X-CSC: 0 X-CHA: v=2.3 cv=e6d4tph/ c=1 sm=1 tr=0 a=63Z2wlQ1NB3xHpgKFKE71g==:117 a=63Z2wlQ1NB3xHpgKFKE71g==:17 a=uwsMhd2ctEQA:10 a=M51BFTxLslgA:10 a=8VZ4dRtX2nhlE9WnawwA:9 a=CjuIK1q_8ugA:10 a=2P5T6G8NMmGkgBN5djYA:9 a=B2y7HmGcmWMA:10 X-Origin-Country: SE X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.io gmane.emacs.bugs:191626 Archived-At: --Apple-Mail=_2D5E9497-A742-4FB7-A33B-4B7D8683EAA2 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset=us-ascii Thanks for the report! Does this patch help? --Apple-Mail=_2D5E9497-A742-4FB7-A33B-4B7D8683EAA2 Content-Disposition: attachment; filename=0001-Fix-sunrise-and-sunset-calculation-bug-44237.patch Content-Type: application/octet-stream; x-unix-mode=0644; name="0001-Fix-sunrise-and-sunset-calculation-bug-44237.patch" Content-Transfer-Encoding: quoted-printable =46rom=2012fad1d89b101662d3c81c92138e8801f6ad7622=20Mon=20Sep=2017=20= 00:00:00=202001=0AFrom:=20=3D?UTF-8?q?Mattias=3D20Engdeg=3DC3=3DA5rd?=3D=20= =0ADate:=20Mon,=2026=20Oct=202020=2018:44:05=20+0100=0A= Subject:=20[PATCH]=20Fix=20sunrise=20and=20sunset=20calculation=20= (bug#44237)=0A=0A*=20lisp/calendar/solar.el=20(solar-moment):=20Use=20= initial=20values=20for=20binary=0Asearch=20that=20won't=20end=20the=20= loop=20prematurely=20and=20yield=20incorrect=0Aanswers.=0A*=20= test/lisp/calendar/solar-tests.el:=20New=20file.=0A---=0A=20= lisp/calendar/solar.el=20=20=20=20=20=20=20=20=20=20=20=20|=20=204=20+--=0A= =20test/lisp/calendar/solar-tests.el=20|=2042=20= +++++++++++++++++++++++++++++++=0A=202=20files=20changed,=2044=20= insertions(+),=202=20deletions(-)=0A=20create=20mode=20100644=20= test/lisp/calendar/solar-tests.el=0A=0Adiff=20--git=20= a/lisp/calendar/solar.el=20b/lisp/calendar/solar.el=0Aindex=20= 05bb3164e1..07562f6224=20100644=0A---=20a/lisp/calendar/solar.el=0A+++=20= b/lisp/calendar/solar.el=0A@@=20-490,8=20+490,8=20@@=20solar-moment=0A=20= =20=20=20=20=20=20=20=20=20(utmin=20(+=20ut=20(*=20direction=2012.0)))=0A= =20=20=20=20=20=20=20=20=20=20(utmax=20ut)=20=20=20=20=20;=20the=20time=20= searched=20is=20between=20utmin=20and=20utmax=0A=20=20=20=20=20=20=20=20=20= =20;;=20utmin=20and=20utmax=20are=20in=20hours.=0A-=20=20=20=20=20=20=20=20= =20(utmoment-old=200.0)=20=20=20=20=20=20=20=20=20=20=20=20=20;=20rise=20= or=20set=20approximation=0A-=20=20=20=20=20=20=20=20=20(utmoment=201.0)=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20;=20rise=20or=20set=20= approximation=0A+=20=20=20=20=20=20=20=20=20(utmoment-old=20utmin)=20=20=20= =20=20=20=20=20=20=20=20;=20rise=20or=20set=20approximation=0A+=20=20=20=20= =20=20=20=20=20(utmoment=20utmax)=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20;=20rise=20or=20set=20approximation=0A=20=20=20=20=20=20=20=20=20=20= (hut=200)=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20;=20sun=20height=20at=20utmoment=0A=20=20=20=20=20=20=20=20=20=20= (t0=20(car=20time))=0A=20=20=20=20=20=20=20=20=20=20(hmin=20(cadr=20= (solar-horizontal-coordinates=20(list=20t0=20utmin)=0Adiff=20--git=20= a/test/lisp/calendar/solar-tests.el=20= b/test/lisp/calendar/solar-tests.el=0Anew=20file=20mode=20100644=0Aindex=20= 0000000000..441beafe71=0A---=20/dev/null=0A+++=20= b/test/lisp/calendar/solar-tests.el=0A@@=20-0,0=20+1,42=20@@=0A+;;;=20= solar-tests.el=20---=20tests=20for=20solar.el=20=20=20=20=20=20=20=20=20=20= =20=20-*-=20lexical-binding:=20t=20-*-=0A+=0A+;;=20Copyright=20(C)=20= 2020=20Free=20Software=20Foundation,=20Inc.=0A+=0A+;;=20This=20file=20is=20= part=20of=20GNU=20Emacs.=0A+=0A+;;=20GNU=20Emacs=20is=20free=20software:=20= you=20can=20redistribute=20it=20and/or=20modify=0A+;;=20it=20under=20the=20= terms=20of=20the=20GNU=20General=20Public=20License=20as=20published=20= by=0A+;;=20the=20Free=20Software=20Foundation,=20either=20version=203=20= of=20the=20License,=20or=0A+;;=20(at=20your=20option)=20any=20later=20= version.=0A+=0A+;;=20GNU=20Emacs=20is=20distributed=20in=20the=20hope=20= that=20it=20will=20be=20useful,=0A+;;=20but=20WITHOUT=20ANY=20WARRANTY;=20= without=20even=20the=20implied=20warranty=20of=0A+;;=20MERCHANTABILITY=20= or=20FITNESS=20FOR=20A=20PARTICULAR=20PURPOSE.=20=20See=20the=0A+;;=20= GNU=20General=20Public=20License=20for=20more=20details.=0A+=0A+;;=20You=20= should=20have=20received=20a=20copy=20of=20the=20GNU=20General=20Public=20= License=0A+;;=20along=20with=20GNU=20Emacs.=20=20If=20not,=20see=20= .=0A+=0A+(require=20'ert)=0A+(require=20= 'solar)=0A+=0A+(ert-deftest=20solar-sunrise-sunset=20()=0A+=20=20;;=20= Bug#44237:=20wrong=20sunrise=20time=20on=20Dec=2030=20and=2031,=202020=20= for=20Jaipur.=0A+=20=20(let=20((calendar-latitude=2026.9)=0A+=20=20=20=20= =20=20=20=20(calendar-longitude=2075.8)=0A+=20=20=20=20=20=20=20=20= (calendar-time-zone=20+330)=0A+=20=20=20=20=20=20=20=20= (calendar-standard-time-zone-name=20"IST")=0A+=20=20=20=20=20=20=20=20= (calendar-daylight-time-zone-name=20"IST")=0A+=20=20=20=20=20=20=20=20= (epsilon=20(/=2060.0)))=20=20=20=20=20=20=20=20=20=20=20=20=20;=20Minute=20= accuracy=20is=20good=20enough.=0A+=20=20=20=20(let*=20((sunrise-sunset=20= (solar-sunrise-sunset=20'(12=2030=202020)))=0A+=20=20=20=20=20=20=20=20=20= =20=20(sunrise=20(car=20(nth=200=20sunrise-sunset)))=0A+=20=20=20=20=20=20= =20=20=20=20=20(sunset=20(car=20(nth=201=20sunrise-sunset))))=0A+=20=20=20= =20=20=20(should=20(<=20(abs=20(-=20sunrise=207.27))=20epsilon))=0A+=20=20= =20=20=20=20(should=20(<=20(abs=20(-=20sunset=2017.72))=20epsilon)))=0A+=20= =20=20=20(let*=20((sunrise-sunset=20(solar-sunrise-sunset=20'(12=2031=20= 2020)))=0A+=20=20=20=20=20=20=20=20=20=20=20(sunrise=20(car=20(nth=200=20= sunrise-sunset)))=0A+=20=20=20=20=20=20=20=20=20=20=20(sunset=20(car=20= (nth=201=20sunrise-sunset))))=0A+=20=20=20=20=20=20(should=20(<=20(abs=20= (-=20sunrise=207.28))=20epsilon))=0A+=20=20=20=20=20=20(should=20(<=20= (abs=20(-=20sunset=2017.72))=20epsilon)))))=0A+=0A+(provide=20= 'solar-tests)=0A--=20=0A2.21.1=20(Apple=20Git-122.3)=0A=0A= --Apple-Mail=_2D5E9497-A742-4FB7-A33B-4B7D8683EAA2--