[Xfce4-commits] r27985 - in xfcalendar/trunk: . src
Jari Rahkonen
jari.rahkonen at pp1.inet.fi
Tue Sep 30 11:17:40 CEST 2008
Brian J. Tarricone kirjoitti:
> On Tue, 30 Sep 2008 07:46:04 +0200 Yves-Alexis Perez wrote:
>
>> On lun, 2008-09-29 at 18:09 +0000, Juha Kautto wrote:
>>> +void init_default_timezone()
>>> +{
>>> + gsize len;
>>> +
>>> + g_free(g_par.local_timezone);
>>> + if (g_file_get_contents("/etc/timezone", &g_par.local_timezone
>>> + , &len, NULL)) {
>>> + /* success! let's check it */
>>> + if (len > 2) /* get rid of the \n at the end */
>>> + g_par.local_timezone[len-1] = 0;
>>> + if (!xfical_set_local_timezone()) { /* test that ical
>>> knows it */
>>> + g_free(g_par.local_timezone);
>>> + g_par.local_timezone = NULL;
>>> + }
>>> + }
>>> + if (!ORAGE_STR_EXISTS(g_par.local_timezone))
>>> + g_par.local_timezone = g_strdup("floating");
>>> +}
>>> +
>> I'm not sure all distrib put timezone informations in /etc/timezone.
>> That's the case on Debian (and derivative I guess) but (I'll check
>> later) not on Fedora/Red-Hat and maybe other. Not talking about BSD
>> stuff.
>
> Yeah, Gentoo doesn't have it in a file anywhere; just /etc/localtime is
> either the raw timezone data file, or a symlink to the tz data file in
> /usr/share/zoneinfo.
>
> -b
You shouldn't count on Ubuntu keeping the file either. Hardy had
/etc/timezone, but it seems to be gone after upgrading to Intrepid.
- Jari
More information about the Xfce4-dev
mailing list