ICYMI: Emacs World Clock
06 Oct 2023 Charles Choi
If online conferencing and chat are enmeshed in your daily life, invariably you'll run into interaction across different time zones. Wanting to know what time it is “over there” is a frequent question. If you use (or perhaps more accurately, live) in Emacs, the built-in command
world-clock answers it.
world-clock creates a new Emacs window displaying the current time (lazily auto-refreshed) in different time zones as shown below.
You can specify which time zones are displayed by
world-clock by customizing the variable
world-clock-list is customized with user-specified time zones, its type is an association list whose elements have the form
TIMEZONE is a tz database name and
LABEL is an arbitrary string that is usually mapped to a city within that
TIMEZONE. On Unix-based systems, you can derive a specific
TIMEZONE from inspecting the directory structure of
/usr/share/zoneinfo. Personally, I use
M-x customize-option to set
world-clock-list as shown below.
world-clock has been around since Emacs 28.1 (actually it was a renaming of the less-discoverable command
display-time-world) and is a command that I use routinely. If you work with folks in other time zones and live in Emacs, you'll probably find
world-clock to be an essential command.