Re: Getting country code from gnome clock?

On Wed, 2008-06-04 at 22:03 +0300, Antti Kaijanmäki wrote:
> OK.. sometimes it's just too obvious..
>    /etc/timezone

$ ls -l /etc/timezone
ls: cannot access /etc/timezone: No such file or directory

It is too obvious.

In GConf, /apps/panel/applets/clock_applet/prefs/cities has the list of
cities currently setup in the clock applet, as well as the current one.

You can then use libgweather to get from the timezone to the country
(Locations.xml has ISO country-codes for each country, under which
you'll find the different locations with their timezones).

And if you want to present the real name, you can use iso-codes to get
the localised country name from the country code.


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]