Contents

[edit] Info

UPDATED IN TIME FOR END OF DST IN EUROPE: Memory leak fixed (thanks whise)

A version of the default Clock screenlet with timezone support and custom date/time formats for the caption. The WorldClock screenlet automatically adjusts for daylight saving time (DST) according to rules for the selected timezone. Customizable date/time formats allow multi-line time display including seconds and timezone abbreviation (e.g., EDT, CEST) display.

Based on work by RYX, whose work was in turn based on MacSlow's original cairo-clock. The default theme is nothing more than the "station" theme from RYX's Clock screenlet with the addition of a globe background.


[edit] Installation

Install as usual by extracting the contents of the screenlet's archive to the directory "$HOME/.screenlets".


[edit] Requirements

Requires python-dateutil.


[edit] Usage

Open a terminal window and navigate to the screenlet's directory:

$ cd /home/<username>/.screenlets/WorldClock

Execute the WorldClock's main file using python:

$ python WorldClockScreenlet.py

You can select the WorldClock's timezone from the Clock options tab of the Properties window. Right-click the WorldClock screenlet and select Properties... from the context menu to open the Properties window. Select the Options tab, then the Clock sub-tab. Select your desired timezone from the Timezone list.

The caption can be edited from the Face options tab of the Properties window. Right-click the WorldClock screenlet and select Properties... from the context menu to open the Properties window. Select the Options tab, then the Face sub-tab. Edit the Face-Text option to change the caption. The Face-Text option supports date/time formatting wildcards using the popular strftime library function. Supported wildcards include (based on information from http://docs.python.org/lib/module-time.html):

%a Locale's abbreviated weekday name.

%A Locale's full weekday name.

%b Locale's abbreviated month name.

%B Locale's full month name.

%c Locale's appropriate date and time representation.

%d Day of the month as a two digit number from 00 to 31.

%H Hour (24-hour clock) as a two digit number from 00 to 23.

%I Hour (12-hour clock) as a two digit number from 00 to 12.

%j Day of the year as a three digit number from 001 to 366 (supports leap years).

%m Month as a two digit number from 01 to 12.

%M Minute as a decimal number from 00 to 59.

%n A line feed character. This wildcard may not be supported on all platforms.

%p Locale's equivalent of either AM or PM.

%S Second as a two digit number from 00 to 61 (supports leap seconds and double leap seconds).

%U Week number of the year (Sunday as the first day of the week) as a two digit number from 00 to 53. All days in a new year preceding the first Sunday are considered to be in week 00.

%w Weekday (Sunday as the first day of the week) as a one digit number from 0 to 6.

%W Week number of the year (Monday as the first day of the week) as a two digit number from 00 to 53. All days in a new year preceding the first Monday are considered to be in week 00.

%x Locale's appropriate date representation.

%X Locale's appropriate time representation.

%y Year without century as a decimal number [00,99].

%Y Year with century as a decimal number.

%Z Time zone abbreviation (e.g., EDT, CEST).

%% A literal "%" character.

[edit] Discussion

http://forum.compiz-fusion.org/showthread.php?t=4366
WorldClock

A clock screenlet with enhanced timezone support and multi-line custom date/time display.

Authorjsf
Version0.9.2
API Version0.0.9
Download[1]

Image:WorldClock.jpg