April 17th 2026 - Things I Worked On

World Clock

I have friends that live in different parts of the world. Sometimes I forget what their local time is and its annoying to have to Google it every time. Luckily, Emacs has a world clock built in. I've configured it just the way I like it.

Show times as AM/PM

See (format-time-string) function for formatting explanation

(setq world-clock-time-format "%I:%M %p %a, %b %d")

Add locations

These are just examples and not the actual locations where my friends live.

(setq world-clock-list '(("Africa/Casablanca" "Marrakech")
                         ("America/New_York" "Miami")
                         ("America/Chicago" "Dallas")))

Key Bindings

(defun my/show-world-clock ()
  "Display the world-clock buffer in the echo area."
  (interactive)
  (save-window-excursion
    (let ((world-clock-buffer-name "*wclock-temp*"))
      (world-clock)
      (message (string-trim (buffer-string)))
      (kill-buffer world-clock-buffer-name))))

(evil-leader/set-key
  "w c" 'my/show-world-clock)