]> git.eshelyaron.com Git - emacs.git/commitdiff
Assume current-time-zone exists
authorPaul Eggert <eggert@cs.ucla.edu>
Thu, 16 Dec 2021 17:40:22 +0000 (09:40 -0800)
committerPaul Eggert <eggert@cs.ucla.edu>
Thu, 16 Dec 2021 19:17:27 +0000 (11:17 -0800)
* lisp/timezone.el (timezone-time-zone-from-absolute): Simplify by
assuming current-time-zone exists (true since Emacs 19.7 in 1993).

lisp/timezone.el

index 0fcdbdbc16c9db0280a2449e807f2351cf5d0345..7a461c4e22d52893fd3f263e8af00a0ea2178a2c 100644 (file)
@@ -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.