October 9, 2008

Clocks for time travelers

Author: Colin Beckingham

Whether you believe that punctuality is "the politeness of kings" or "the art of guessing how late the other fellow is going to be," you can count on your Linux box for information about local times across the globe, so that you can plan a punctual VoIP call, stock transaction, or meeting. Here are some world clocks that work well on the desktop.

World time is a topic fraught with complexities and exceptions: Daylight Savings Time, fractional hour discrepancies, exceptional time zones, today, tomorrow, or yesterday. Some tools handle these difficulties well, and others not so well. On a practical level, however, what you need to know comes down to two basic questions: What time is it right now in Rubovia? And is it a good time to call Mary?

By the way, it almost goes without saying that none of these tools works well if your system clock is inaccurate. You can keep it synced with a network time protocol server by running a command like ntpdate pool.ntp.org frequently.

General tools

Perhaps the simplest way to learn what time it is elsewhere in the world is to change the locale setting of your desktop. On my KDE 4 desktop under openSUSE 11, for instance, I can right-click the clock and select digital (or analog) clock settings -> Appearance -> Show timezone, then deselect Timezones -> Use local timezone. This activates the list of available timezones, from which I can select the needed timezone and click Apply and OK. The clock then shows the local time in the destination location. You can have multiple clocks, either digital or analog, so this is a quick way to show multiple world times. The big advantage of this approach is that it handles fractional hour differences well, but the system clock lacks any expanded functionality such as alarms or customizable text overlays.

KWorldClock is a part of the KDE installation that also works in GNOME. It displays a graphical representation of the parts of the globe that currently have night or day conditions, and mouse rollovers on the map pop up local time information.

Extendable world clocks

I prefer to have more customizable clocks, responding to situations such as an appointment to call a colleague in Rubovia at 10:00 a.m. Rubovia time. For that to happen I need to mark the clock "Fred-Rubovia" and then set an alarm reminder. A good alternative in this situation is to use a screenlet. Screenlets offer a daemon platform on top of which small Python-based applications operate. A link to the screenlets manager sits in a task panel, and from this common point you can launch or stop various screenlets as required. I installed the basic screenlets package from the 1-Click install at the openSUSE screenlets page; it's also available for other distros.

There are a number of screenlet clocks, including Clock, Digiclock, Kclock, and WallpaperClock, all of which come with the basic install of the manager and have basic functionality. You can also find more customizable clocks, such as WorldClock and Perfect Clock for Linux.

WorldClock is a puzzle for me. I can get it to install, and it while it correctly displays the clock face, it does not display the time on the face. On a different machine or distribution you may have better luck. Even without the display, the alarm works well.

I had better luck with Perfect Clock, as you can see from this example layout. I arranged these four clocks in a square for the purposes of demonstration only; on my desktop I would display them all in a line at the top of my screen, and all would be analog yellow-faced clocks on a blue background, unless I needed to distinguish one for a special purpose. The overlaid notations are MX for Mexico, AR BR for Argentina and Brazil, which share the same time zone, UK for United Kingdom, and OZ for Australia. I set each of the clocks by referring to the time displayed for that region from the basic digital KDE widget.

It took me a while to get the customized text overlay to appear in the clock face of Perfect Clock for Linux. At first I could see nothing, then I found that in a circular clock the default text may be too small and too far into the top left corner to be visible. With a size of 40% for the overall clock, Properties -> Options -> Face gives access to the custom text parameters. I chose a font size of 28 from an installed font such as Sans, clicked the 'text-color' box to select a color (black) and opacity (255). Using the up and down spinners for X and Y position of the text adjusts the text on the face in near real time.

On my machine the alarm on Perfect Clock for Linux screenlets does not work, so it's back to WorldClock for that functionality. Selecting the WorldClock first, sizing the square face to be slightly larger than the Perfect Clock, and editing its functional alarm properties provides the alarm base. Conveniently, the WorldClock alarm can be set in terms of the local or remote timezone. Then I drop the relevant circular clock face of Perfect Clock over WorldClock, leaving the corners of the WorldClock visible beneath. When the WorldClock alarm triggers, the corners surrounding the Perfect Clock flash, giving a visual signal.

A downside of both WorldClock and Perfect Clock for Linux is that neither supports fractional hour differences. In a Canadian context this is significant for my contacts in Newfoundland, which is -1.5 hours relative to my own Toronto time. For the residents of Newfoundland, most other timezones are a non-integer setting distant.

Despite these difficulties, world clocks on the desktop can be useful tools, enabling the Linux user to be strictly prompt, enthusiastically early, or fashionably late according to need or inclination.

Categories:

  • Reviews
  • Tools & Utilities
  • Desktop Software