Function: world-clock

world-clock is an autoloaded, interactive and byte-compiled function defined in time.el.gz.

Signature

(world-clock)

Documentation

Display a world clock buffer with times in various time zones.

The variable world-clock-list specifies which time zones to use. To turn off the world time display, go to the window and type C-x w q (quit-window).

Probably introduced at or before Emacs version 28.1.

Key Bindings

Aliases

display-time-world (obsolete since 28.1)

Source Code

;; Defined in /usr/src/emacs/lisp/time.el.gz
;;;###autoload
(defun world-clock ()
  "Display a world clock buffer with times in various time zones.
The variable `world-clock-list' specifies which time zones to use.
To turn off the world time display, go to the window and type \\[quit-window]."
  (interactive)
  (if-let ((buffer (get-buffer world-clock-buffer-name)))
      (pop-to-buffer buffer)
    (pop-to-buffer world-clock-buffer-name)
    (when world-clock-timer-enable
      (setq world-clock--timer
            (run-at-time t world-clock-timer-second #'world-clock-update))
      (add-hook 'kill-buffer-hook #'world-clock-cancel-timer nil t)))
  (world-clock-display (time--display-world-list))
  (world-clock-mode)
  (fit-window-to-buffer))