
World Clock Screenlet
Source (link to git-repo or to original if based on someone elses unmodified work):
Description:
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.
Originally created to track current time in Kabul, Afghanistan from my home in Austin, Texas, USA. Kabul's offset from UTC is not an even number of hours, so the default clock screenlet is unable to display Kabul time correctly.
Released in time for end of Daylight Saving Time (DST) in the United States. True timezone support is most critical right around beginning and end of Daylight Saving Time, to ensure that the rules for the target timezone are applied and not the rules for the user's local timezone.
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.
NOTE: Requires python-dateutil package. Last changelog:
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.
Originally created to track current time in Kabul, Afghanistan from my home in Austin, Texas, USA. Kabul's offset from UTC is not an even number of hours, so the default clock screenlet is unable to display Kabul time correctly.
Released in time for end of Daylight Saving Time (DST) in the United States. True timezone support is most critical right around beginning and end of Daylight Saving Time, to ensure that the rules for the target timezone are applied and not the rules for the user's local timezone.
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.
NOTE: Requires python-dateutil package.
v 0.9.2 - removed bullet-proofing on update_timezone
added caching of tzinfo to update; for some reason, __setattr__ not being called at the proper time
v 0.9.1 - moved to cached pango_layout object to prevent memory leaks (thanks to whise)
added text alignment
v 0.9.0a - repackaged using screenlets-packager
v 0.9.0 - original upload to gnome-look.org
Ratings & Comments
13 Comments
9 ew
Hi, jsf! Thank You for this nice screenlet. I'm currently using it twice: one clock instance for CEST time zone (Germany) and one instance for NPT time zone (Nepal). But I think there is a bug in v0.9.2. The digital time is displayed correctly but the analog time seems to be wrong (the watch hand for hours is misleading). Please see the screenshot.. http://www.baudys.de/Screenshot_WordClockScreenlet_Wrong_analog_time.jpg ..that I made and note that digital and analog time is NOT the same (digital time is correct though). Could You please fix this if it's really a bug? Or shall I open a bug report for it somewhere? Thank You very much in advance. Dennis aka Condor
It worked well for me, but after upgrade to Ubuntu 8.10 Intrepid (I guess), it launches three instances of the clock on "launch screenlet" and none of them shows the correct time. All three have different themes (?), but show the same local time; changing timezones has no effect at all. How could I fix this?
That doesn't sound good. What version of screenlets are you running, and do you have the python-dateutil package? What incorrect times are shown? Sorry about the long lag before responding; haven't looked at this page in months.
Screenlet Manager v 0.1.12, WorldClockScreenlet v 0.9.1., python-dateutil is installed and has version number 1.4-1ubuntu2. Launching three instances at once is not a feature of this screenlet, as some others also appear in many instances. In order to get the proper time I set the time zone as Etc/GMT+2 instead of Europe/Moscow (which is GMT+3). And it does not change its shown time, when I change time zones.
The problems you have - do they occur for the default Clock screenlet, as well?
Difficult to say, as I don't understand, what the Clock screenlet is showing. The only instance I use displays the correct time, having Time Zone -- Pacific/Auckland Time-Offset -- 0.0 When I launched the second instance it displayed what I guess was GMT. If I changed Time-offset to +3 it displayed the correct time for Moscow, so did it if I set Time-offset=0 and Time Zone - Europe/Moscow (I had to type it as there was no list). Looks like the Clock screenlet works fine.
Screenlets manager 0.1.12? I know of a 0.1.2 and a 0.0.12, but not 0.1.12. Are you sure it isn't 0.1.2 or 0.0.12?
Sorry, it is 0.1.2. WorldClock either shows my local time, regardless of the TimeZone settings (its reading doesn't change, when I play with time zones), or the time, which I think ignores daylight saving. One instance has Face Text as follows Austin%n%n%n%n%A, %b %e%n%T %Z Actual reading is Austin... Sunday, Dec 28 08:19:12 NZDT which is my local time and would be perfectly correct, if it were not set to America/Chicago.
It looks to me as though it's showing you New Zealand time, as you have probably guessed. Are you changing the timezone settings in the Clock tab of the World Clock screenlet's properties window?
Hmmm... I wonder if maybe the timezone files aren't where the screenlet is expecting to find them. Have you tried selecting a different timezone from the dropdown?
v 0.9.2 should resolve this issue. Thanks for your help, VictorR
Please add your stuff to launchpad. You can set up your own branch and have people get all your updates, and if you feel like it, you can add your stuff to 3rd party screenlets which will hopefully be set up as an install package. See https://code.launchpad.net/~3rd-party-screenlets-team/screenlets/3rd-party-screenlets You can keep your stuff in a separate branch if you'd like, and then merge whenever you feel like it. I'll add you to the team if you choose to do this. You can also keep your stuff in the main branch if that's more like your cup of tea. Oh, and you can still keep the info here, and just keep itin synch with bzr.