From 89719ce9c51e8946471d42dff32c2c8ac769d242 Mon Sep 17 00:00:00 2001 From: "Edward M. Reingold" Date: Mon, 7 Nov 1994 16:39:17 +0000 Subject: [PATCH] Check for nil time before trying to adjust it for dst. --- lisp/calendar/solar.el | 4 ++-- 1 file 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))) -- 2.39.5