A Minimalistic Multi-Timezone Clock

I am using xmonad as my primary window manager. A friend asked me how did I replicate functionalities from other desktop environments. One of the things he could not find was to have a multi-timezone clock.

So here it is. In fact, it is just another tool, which has nothing to do with xmonad or Haskell. It is just an executable shell script – multitz:

in=`TZ=Asia/Kolkata date +"%c"`
uk=`TZ=GMT date +"UK %c"`
ca=`TZ=America/Los_Angeles date +"CA %c"`
ny=`TZ=America/New_York date +"NY %c"`
(printf "%s | %s | %s\n" "$uk" "$ny" "$ca"; sleep 3) | dzen2

It uses the shell commands to get the times for different zones, and displays them using a status bar called dzen2.

I involve xmonad only to assign a hot-key or a keyboard shortcut to use it:

    -- show dzen2 statusbar
    , ((modMask, xK_s), spawn "/home/anadgouda/bin/multitz")

That’s it, I get my own applet of multiple timezones on pressing the Windows key (my modMask in xmonad) + s.

Discussion [Participate or Link]

  1. Bhasker said:

    Fantastic !
    Sadly there is no proper internation clock applet which works well with xfce4. This is fine (I changed it and used xmesssage )

Say your thought!

If you want to use HTML you can use these tags: <a>, <em>, <strong>, <abbr>, <code>, <blockquote>. Closing the tags will be appreciated as this site uses valid XHTML.



Abhijit Nadgouda
iface Consulting
+91 9819820312
My bookmarks


This is the weblog of Abhijit Nadgouda where he writes down his thoughts on software development and related topics. You are invited to subscribe to the feed to stay updated or check out more subscription options. Or you can choose to browse by one of the topics.