diff options
author | Paul Eggert <eggert@cs.ucla.edu> | 2021-12-16 09:40:22 -0800 |
---|---|---|
committer | Paul Eggert <eggert@cs.ucla.edu> | 2021-12-16 11:17:27 -0800 |
commit | f25ad39983cc3e89b007390bc0fd860f48379497 (patch) | |
tree | d90cf78241d0def9e7f11d90e3dfc2280024bccc /lisp/timezone.el | |
parent | e0ca8f791c2e4396f1e40d86c136ae547b40185d (diff) | |
download | emacs-f25ad39983cc3e89b007390bc0fd860f48379497.tar.gz |
Assume current-time-zone exists
* lisp/timezone.el (timezone-time-zone-from-absolute): Simplify by
assuming current-time-zone exists (true since Emacs 19.7 in 1993).
Diffstat (limited to 'lisp/timezone.el')
-rw-r--r-- | lisp/timezone.el | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/lisp/timezone.el b/lisp/timezone.el index 0fcdbdbc16c..7a461c4e22d 100644 --- a/lisp/timezone.el +++ b/lisp/timezone.el @@ -299,11 +299,10 @@ Return a list in the same format as `current-time-zone's result, or nil if the local time zone could not be computed. DATE is the number of days elapsed since the (imaginary) Gregorian date Sunday, December 31, 1 BC." - (and (fboundp 'current-time-zone) - (let ((utc-time (timezone-time-from-absolute date seconds))) - (and utc-time - (let ((zone (current-time-zone utc-time))) - (and (car zone) zone)))))) + (let ((utc-time (timezone-time-from-absolute date seconds))) + (and utc-time + (let ((zone (current-time-zone utc-time))) + (and (car zone) zone))))) (defun timezone-fix-time (date local timezone) "Convert DATE (default timezone LOCAL) to YYYY-MM-DD-HH-MM-SS-ZONE vector. |