]> git.eshelyaron.com Git - emacs.git/commitdiff
Check for nil time before trying to adjust it for dst.
authorEdward M. Reingold <reingold@emr.cs.iit.edu>
Mon, 7 Nov 1994 16:39:17 +0000 (16:39 +0000)
committerEdward M. Reingold <reingold@emr.cs.iit.edu>
Mon, 7 Nov 1994 16:39:17 +0000 (16:39 +0000)
lisp/calendar/solar.el

index 6eb412758b0386141f9a7c8bc58fc13c378d6267..a35dfe53f13d5ee5d2cfbbc9f1906ad5df046fcd 100644 (file)
@@ -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)))