]> git.eshelyaron.com Git - emacs.git/commitdiff
Use decoded time accessors in timer
authorLars Ingebrigtsen <larsi@gnus.org>
Tue, 30 Jul 2019 11:08:49 +0000 (13:08 +0200)
committerLars Ingebrigtsen <larsi@gnus.org>
Tue, 30 Jul 2019 11:08:49 +0000 (13:08 +0200)
* lisp/emacs-lisp/timer.el (run-at-time): Use decoded time
accessors.

lisp/emacs-lisp/timer.el

index 22ccc35103a7009e8e128669116ce39050e74874..400f00a85b5a4ed5e1aee90febdd912529a0100d 100644 (file)
@@ -375,8 +375,11 @@ This function returns a timer object which you can use in
              (now (decode-time)))
          (if (>= hhmm 0)
              (setq time
-                   (encode-time 0 (% hhmm 100) (/ hhmm 100) (nth 3 now)
-                                (nth 4 now) (nth 5 now) (nth 8 now)))))))
+                   (encode-time 0 (% hhmm 100) (/ hhmm 100)
+                                 (decoded-time-day now)
+                                (decoded-time-month now)
+                                 (decoded-time-year now)
+                                 (decoded-time-zone now)))))))
 
   (or (consp time)
       (error "Invalid time format"))