Hi,

Le mercredi 04 juin 2008, à 16:14 +0300, Antti Kaijanmäki a écrit :
> Hello,
> 
> Is there a way of getting the timezone out of gnome clock? I need in

It depends what you mean by "the timezone" and "get the timezone" :-)

The timezones displayed in the clock are saved in gconf:
/apps/panel/applets/clock_screen0/prefs/cities (where you'll have to
replace clock_screen0 by something else, depending on your
configuration)

> particular the code of the country the user has selected. I'm developing
> a program[1] that could automatically choose a country from a list based
> on this knowledge.

Ok, so look at /apps/panel/applets/clock_screen0/prefs/cities (you'll
have to look at all "directories" below /apps/panel/applets to find the
ones where bonobo_iid is OAFIID:GNOME_ClockApplet), find the location
for which current is set to true, get the timezone for this location and
then use /usr/share/zoneinfo/zone.tab to get the country code for this
timezeon, and /usr/share/zoneinfo/iso3166.tab to get the english human
readable name for this country.

Vincent

-- 
Les gens heureux ne sont pas pressés.
_______________________________________________
desktop-devel-list mailing list
[email protected]
http://mail.gnome.org/mailman/listinfo/desktop-devel-list

Reply via email to