diff options
| author | Paul Eggert | 1993-12-05 18:29:24 +0000 |
|---|---|---|
| committer | Paul Eggert | 1993-12-05 18:29:24 +0000 |
| commit | 238c5cc1cc55dfb5a73d4d04937f9ccda7d41e18 (patch) | |
| tree | 3494c4b598a786e6a9276caf8ec1e7fa4401176c | |
| parent | 9a51ed3ae46fef0fbd5d21778cb1c8c4667bf667 (diff) | |
| download | emacs-238c5cc1cc55dfb5a73d4d04937f9ccda7d41e18.tar.gz emacs-238c5cc1cc55dfb5a73d4d04937f9ccda7d41e18.zip | |
(lunar-phase): Add calendar-time-zone to solar ephemeris correction.
This fixes a bug where GMT was being reported as if it were local time.
| -rw-r--r-- | lisp/calendar/lunar.el | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/lisp/calendar/lunar.el b/lisp/calendar/lunar.el index 4f9b5a35eaf..1d8e45492ea 100644 --- a/lisp/calendar/lunar.el +++ b/lisp/calendar/lunar.el | |||
| @@ -1,6 +1,6 @@ | |||
| 1 | ;;; lunar.el --- calendar functions for phases of the moon. | 1 | ;;; lunar.el --- calendar functions for phases of the moon. |
| 2 | 2 | ||
| 3 | ;; Copyright (C) 1992 Free Software Foundation, Inc. | 3 | ;; Copyright (C) 1992, 1993 Free Software Foundation, Inc. |
| 4 | 4 | ||
| 5 | ;; Author: Edward M. Reingold <reingold@cs.uiuc.edu> | 5 | ;; Author: Edward M. Reingold <reingold@cs.uiuc.edu> |
| 6 | ;; Keywords: calendar | 6 | ;; Keywords: calendar |
| @@ -160,10 +160,12 @@ remainder mod 4 gives the phase: 0 new moon, 1 first quarter, 2 full moon, | |||
| 160 | ((= phase 2) (- adjustment adj)) | 160 | ((= phase 2) (- adjustment adj)) |
| 161 | (t adjustment))) | 161 | (t adjustment))) |
| 162 | (date (+ date adjustment)) | 162 | (date (+ date adjustment)) |
| 163 | (date (+ date (- (/ (solar-ephemeris-correction | 163 | (date (+ date (/ (- calendar-time-zone |
| 164 | (solar-ephemeris-correction | ||
| 164 | (extract-calendar-year | 165 | (extract-calendar-year |
| 165 | (calendar-gregorian-from-absolute | 166 | (calendar-gregorian-from-absolute |
| 166 | (truncate date)))) 60.0 24.0)))) | 167 | (truncate date))))) |
| 168 | 60.0 24.0))) | ||
| 167 | (time (* 24 (- date (truncate date)))) | 169 | (time (* 24 (- date (truncate date)))) |
| 168 | (date (calendar-gregorian-from-absolute (truncate date)))) | 170 | (date (calendar-gregorian-from-absolute (truncate date)))) |
| 169 | (list date (solar-time-string time date) phase))) | 171 | (list date (solar-time-string time date) phase))) |