From: "Basil L. Contovounesios" <contovob@tcd.ie>
To: "Mattias Engdegård" <mattiase@acm.org>
Cc: 45818@debbugs.gnu.org
Subject: bug#45818: 28.0.50; Test solar-sunrise-sunset fails
Date: Tue, 12 Jan 2021 20:06:30 +0000 [thread overview]
Message-ID: <87ft35j4xl.fsf@tcd.ie> (raw)
In-Reply-To: <28AECF36-B916-427E-A0EC-633AED7CB9BF@acm.org> ("Mattias Engdegård"'s message of "Tue, 12 Jan 2021 19:50:33 +0100")
[-- Attachment #1: Type: text/plain, Size: 3085 bytes --]
Mattias Engdegård <mattiase@acm.org> writes:
> Could you try tracking down the origin of those numbers? Here is a trace of some
> of the relevant functions on my machines:
>
> 1 -> (solar-sunrise-sunset (12 30 2020))
> | 2 -> (solar-exact-local-noon (12 30 2020))
> | | 3 -> (solar-julian-ut-centuries (12 30 2020))
> | | 3 <- solar-julian-ut-centuries: 0.2099520876112252
> | 2 <- solar-exact-local-noon: ((12 30 2020) 6.9905251059993585)
> | 2 -> (solar-julian-ut-centuries (12 30 2020))
> | 2 <- solar-julian-ut-centuries: 0.2099520876112252
> | 2 -> (solar-sidereal-time 0.2099520876112252)
> | 2 <- solar-sidereal-time: 6.592887211896198
> | 2 -> (solar-sunrise-and-sunset (0.2099520876112252 6.9905251059993585) 1.0 75.8 0)
> | 2 <- solar-sunrise-and-sunset: (6.5198219809993585 18.46122823099936 11.941406250000002)
> | 2 -> (solar-sunrise-and-sunset (0.2099520876112252 6.9905251059993585) 26.9 75.8 -0.61)
> | 2 <- solar-sunrise-and-sunset: (7.2698219809993585 17.71122823099936 10.441406250000002)
> | 2 -> (dst-adjust-time (12 30 2020) 7.2698219809993585)
> | 2 <- dst-adjust-time: ((12 30 2020) 7.2666666666045785 "IST")
> | 2 -> (dst-adjust-time (12 30 2020) 17.71122823099936)
> | 2 <- dst-adjust-time: ((12 30 2020) 17.716666666790843 "IST")
> | 2 -> (calendar-date-equal (12 30 2020) (12 30 2020))
> | 2 <- calendar-date-equal: t
> | 2 -> (calendar-date-equal (12 30 2020) (12 30 2020))
> | 2 <- calendar-date-equal: t
> 1 <- solar-sunrise-sunset: ((7.2666666666045785 #1="IST") (17.716666666790843 #1#) "10:26")
Here's my version of this trace:
1 -> (solar-sunrise-sunset (12 30 2020))
| 2 -> (solar-exact-local-noon (12 30 2020))
| | 3 -> (solar-julian-ut-centuries (12 30 2020))
| | 3 <- solar-julian-ut-centuries: 0.2099520876112252
| 2 <- solar-exact-local-noon: ((12 30 2020) 6.9905251059993585)
| 2 -> (solar-julian-ut-centuries (12 30 2020))
| 2 <- solar-julian-ut-centuries: 0.2099520876112252
| 2 -> (solar-sidereal-time 0.2099520876112252)
| 2 <- solar-sidereal-time: 6.592887211896198
| 2 -> (solar-sunrise-and-sunset (0.2099520876112252 6.9905251059993585) 1.0 75.8 0)
| 2 <- solar-sunrise-and-sunset: (6.5198219809993585 18.46122823099936 11.941406250000002)
| 2 -> (solar-sunrise-and-sunset (0.2099520876112252 6.9905251059993585) 26.9 75.8 -0.61)
| 2 <- solar-sunrise-and-sunset: (7.2698219809993585 17.71122823099936 10.441406250000002)
| 2 -> (dst-adjust-time (12 30 2020) 7.2698219809993585)
| 2 <- dst-adjust-time: ((12 30 2020) 6.266666667535901 "IST")
| 2 -> (dst-adjust-time (12 30 2020) 17.71122823099936)
| 2 <- dst-adjust-time: ((12 30 2020) 16.716666667722166 "IST")
| 2 -> (calendar-date-equal (12 30 2020) (12 30 2020))
| 2 <- calendar-date-equal: t
| 2 -> (calendar-date-equal (12 30 2020) (12 30 2020))
| 2 <- calendar-date-equal: t
1 <- solar-sunrise-sunset: ((6.266666667535901 #1="IST") (16.716666667722166 #1#) "10:26")
So I'm guessing dst-adjust-time adjusts for DST in my locale (based on
some cache), but not yours? The following change lets the test succeed
for me:
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: dst.diff --]
[-- Type: text/x-diff, Size: 648 bytes --]
diff --git a/test/lisp/calendar/solar-tests.el b/test/lisp/calendar/solar-tests.el
index 7a37f8db55..dff64635e5 100644
--- a/test/lisp/calendar/solar-tests.el
+++ b/test/lisp/calendar/solar-tests.el
@@ -26,7 +26,7 @@ solar-sunrise-sunset
(calendar-longitude 75.8)
(calendar-time-zone +330)
(calendar-standard-time-zone-name "IST")
- (calendar-daylight-time-zone-name "IST")
+ (calendar-daylight-savings-starts nil)
(epsilon (/ 60.0))) ; Minute accuracy is good enough.
(let* ((sunrise-sunset (solar-sunrise-sunset '(12 30 2020)))
(sunrise (car (nth 0 sunrise-sunset)))
[-- Attachment #3: Type: text/plain, Size: 44 bytes --]
Does it look like TRT? Thanks,
--
Basil
next prev parent reply other threads:[~2021-01-12 20:06 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-01-12 16:28 bug#45818: 28.0.50; Test solar-sunrise-sunset fails Basil L. Contovounesios
2021-01-12 18:50 ` Mattias Engdegård
2021-01-12 20:06 ` Basil L. Contovounesios [this message]
2021-01-12 21:02 ` Mattias Engdegård
2021-01-12 22:09 ` Basil L. Contovounesios
2021-01-13 12:12 ` Mattias Engdegård
2021-01-13 13:04 ` Stefan Kangas
2021-01-13 13:29 ` Mattias Engdegård
2021-01-13 19:03 ` Basil L. Contovounesios
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=87ft35j4xl.fsf@tcd.ie \
--to=contovob@tcd.ie \
--cc=45818@debbugs.gnu.org \
--cc=mattiase@acm.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.