More On The Emacs World Time Clock

As I’ve written before, Emacs has a world clock. Well, it’s not really a clock: just a list of times in various cities but it’s great for today’s remote work place. If your colleagues are stationed all over the world, it’s really useful to know what time it is where they are so you don’t try to contact them at 3 in the morning their time.

As the above linked post says, it’s possible to edit the list of cities listed. The method that Choi uses (in the above link) to configure them is the custom interface but others may prefer a more Lispy way of configuring it.

Bozhidar Batsov also addresses the world clock function and shows us how to configure it in, say, our init.el file. It’s easy to do except for knowing what the proper time zone is for the city you’re interested in. It’s easy to find that out by searching for “iana time zone <city>” For example, if I wanted to add Glasgow to the list, I would search for “iana time zone glasgow” and discover that the proper time zone is “Europe/London”. There’s also a database that you can download that contains all the supported places but it’s definitely overkill for this application.

Batsov also notes that you can edit the time string that gets displayed. Basically, you can specify any format supported by format-time-string. You might find that useful for further automation.

This is just another small example of how Emacs helps smooth your daily workflow. Even if you only occasionally want to know what time it is at Aunt Millie’s, it’s worthwhile looking up her time zone and adding it to the list.

Update [2024-03-15 Fri 12:41]: Glascow → Glasgow.

This entry was posted in General and tagged . Bookmark the permalink.