summaryrefslogtreecommitdiff
path: root/lisp/calendar
diff options
context:
space:
mode:
authorEdward M. Reingold <reingold@emr.cs.iit.edu>1994-11-07 16:39:17 +0000
committerEdward M. Reingold <reingold@emr.cs.iit.edu>1994-11-07 16:39:17 +0000
commite8091af30efa6cbe9067d6da0884c40a82beb2ed (patch)
treeb0f8e8108809c9b42091861f03aec0c5804424c7 /lisp/calendar
parent32f29818fa0b97b05ed12a85048b8a411167d997 (diff)
downloademacs-e8091af30efa6cbe9067d6da0884c40a82beb2ed.tar.gz
Check for nil time before trying to adjust it for dst.
Diffstat (limited to 'lisp/calendar')
-rw-r--r--lisp/calendar/solar.el4
1 files changed, 2 insertions, 2 deletions
diff --git a/lisp/calendar/solar.el b/lisp/calendar/solar.el
index 6eb412758b0..a35dfe53f13 100644
--- a/lisp/calendar/solar.el
+++ b/lisp/calendar/solar.el
@@ -382,9 +382,9 @@ Format used is given by `calendar-time-display-form'."
(defun solar-sunrise-sunset (date)
"String giving local times of sunrise and sunset on Gregorian DATE."
(let* ((rise (solar-sunrise date))
- (adj-rise (solar-adj-time-for-dst date rise))
+ (adj-rise (if rise (solar-adj-time-for-dst date rise)))
(set (solar-sunset date))
- (adj-set (solar-adj-time-for-dst date set)))
+ (adj-set (if set (solar-adj-time-for-dst date set))))
(format "%s, %s at %s"
(if (and rise (calendar-date-equal date (car adj-rise)))
(concat "Sunrise " (apply 'solar-time-string (cdr adj-rise)))