I wanted to add a second clock to my window manager for the curation of a conference. The AwesomeWM clock widget accepts the timezone as an argument, so I just need to find the right one.

Traditionally one just looks in /usr/share/zoneinfo for timezones but the new timedatectl command can also list them:

timedatectl list-timezones

The next problem I had was working out the correct zone for Dallas, Texas. According to an old forum post on Mint Linux’s website:

The correct answer is: America/Chicago

AwesomeWM configuration

First I added a new variable for the alternate timezone:

-- Comment out or set to emtpy string to disable alternate clock
alttimezone="America/Chicago"

I made it grey (so darker than my “home” clock) and included the day part of the date to avoid confusion when the difference crosses midnight. I ended up with this to create the widget:

if alttimezone and (string.len(alttimezone) > 0) then
  local myaltclock = wibox.widget.textclock('<span foreground="grey">(%d, %H:%M)</span>', 60, alttimezone)
end

Finally, adding it to the wibar list (handily Awesome ignores nil widgets, so this works even when alttimezone is not set (to disable the widget)):

   --...
   mytextclock,
   myaltclock,
   -- ...