diff options
| author | Edward M. Reingold | 1994-11-07 16:39:17 +0000 |
|---|---|---|
| committer | Edward M. Reingold | 1994-11-07 16:39:17 +0000 |
| commit | 89719ce9c51e8946471d42dff32c2c8ac769d242 (patch) | |
| tree | acdc5e106246484366ebe680695c83b2a9f79216 | |
| parent | 98fd70174f19111c17f46fc3491c95e99941e5c9 (diff) | |
| download | emacs-89719ce9c51e8946471d42dff32c2c8ac769d242.tar.gz emacs-89719ce9c51e8946471d42dff32c2c8ac769d242.zip | |
Check for nil time before trying to adjust it for dst.
| -rw-r--r-- | lisp/calendar/solar.el | 4 |
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'." | |||
| 382 | (defun solar-sunrise-sunset (date) | 382 | (defun solar-sunrise-sunset (date) |
| 383 | "String giving local times of sunrise and sunset on Gregorian DATE." | 383 | "String giving local times of sunrise and sunset on Gregorian DATE." |
| 384 | (let* ((rise (solar-sunrise date)) | 384 | (let* ((rise (solar-sunrise date)) |
| 385 | (adj-rise (solar-adj-time-for-dst date rise)) | 385 | (adj-rise (if rise (solar-adj-time-for-dst date rise))) |
| 386 | (set (solar-sunset date)) | 386 | (set (solar-sunset date)) |
| 387 | (adj-set (solar-adj-time-for-dst date set))) | 387 | (adj-set (if set (solar-adj-time-for-dst date set)))) |
| 388 | (format "%s, %s at %s" | 388 | (format "%s, %s at %s" |
| 389 | (if (and rise (calendar-date-equal date (car adj-rise))) | 389 | (if (and rise (calendar-date-equal date (car adj-rise))) |
| 390 | (concat "Sunrise " (apply 'solar-time-string (cdr adj-rise))) | 390 | (concat "Sunrise " (apply 'solar-time-string (cdr adj-rise))) |