Previous    |   Up   |    Next

Multiple timezones at a glance

Keeping track of your global team-mates' local time

Working in a globally-distributed team comes with a set of challenges, and timezone differences are a major one. I like to stay aware of what time it is wherever my co-workers happen to be. This is all the more imporant now with multiple companies around the world going fully-remote. For example: If I know a colleague has small children, I’d like to avoid grabbing their attention at bed-time, and let them focus on bedtime logistics.

At work, I want multi-timezone awareness at all times. Suprisingly enough, none of the mainstream productivity apps offer anything like this. Sure, google calendar lets you set up a ‘secondary time zone’, and apple calendar lets you switch between time zones, but these are meager solutions when your team is distributed across several time zones, not just two. I’m not going to be switching my calendar view four times everytime I want to know what’s up.

So I asked myself this question: apart from the mac os menu bar (for which there are multi-timezone clocks available, but alas nothing free), what’s the UI component that I most frequently look at, and which I am able to tweak?

The answer is the command line prompt, a.ka. PS1.

Some people like to really go wild with their CLI prompts. I like mine clean and minimal: no user/hostnames, no colors, no git branches, etc. Up unitl recently, my shell prompt was defined as:

PS1="\$(basename \$(pwd))$ "

which displays as:

p$ cd code/blog

In the interest of timezone-awareness, I decided to display all the labelled localtimes as the first item in my prompt:

YVR:\$(TZ=America/Vancouver date +%H:%M) \
ORD:\$(TZ=America/Chicago date +%H:%M) \
EZE:\$(TZ=America/Buenos_Aires date +%H:%M) \
LHR:\$(TZ=Europe/London date +%H:%M) \
WAW:\$(TZ=Europe/Warsaw date +%H:%M) \
\$(basename \$(pwd))$ "


YVR:12:35 ORD:14:35 EZE:16:35 LHR:20:35 WAW:21:35 p$ cd code/blog
YVR:12:35 ORD:14:35 EZE:16:35 LHR:20:35 WAW:21:35 blog$

This works, but the redundant display of minutes takes up a lot of space and attention. Also, since the number of places where my teammates are located is more-or-less constant, there’s no need to label all the cities. I went through several iterations of visual layouts before settling on the following scheme:

And so we end up with the following:

\$(TZ=America/Vancouver date +%H:%M)\
\$(TZ=America/Chicago date +%H) \
\$(TZ=America/Buenos_Aires date +%H) \
\$(TZ=Europe/London date +%H) \
\$(TZ=Europe/Warsaw date +%H) \
\$(basename \$(pwd))$

giving this effect:

12:37 14 16 20 21:37 p$ cd code/blog
12:37 14 16 20 21:37 blog$

I’m sure this scheme could be futher imporoved for legibility (with, say, country-flag emojis), but for now, it’s given me enormous benefit for a 10-minute productivity hack.

If you’re working in a very distributed team, try this and see if it helps with timezone awareness. Good luck and stay safe!

Previous    |   Up   |    Next