[Xfce4-commits] r27985 - in xfcalendar/trunk: . src

Brian J. Tarricone bjt23 at cornell.edu
Tue Sep 30 08:24:32 CEST 2008


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



More information about the Xfce4-dev mailing list