changeset 9829:0cef7b5644f5

Check for nil time before trying to adjust it for dst.
author Edward M. Reingold <reingold@emr.cs.iit.edu>
date Mon, 07 Nov 1994 16:39:17 +0000
parents e78a12b9ef41
children 8d151c06dc8b
files lisp/calendar/solar.el
diffstat 1 files changed, 2 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/calendar/solar.el	Mon Nov 07 12:13:16 1994 +0000
+++ b/lisp/calendar/solar.el	Mon Nov 07 16:39:17 1994 +0000
@@ -382,9 +382,9 @@
 (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)))