Re: [Evolution-hackers] evolution default timezone



On Tue, 2004-08-03 at 13:04 -0400, William Jon McCann wrote:
> Hi,
> 
> The clock applet now uses the GConf key 
> /apps/evolution/calendar/display/timezone to set the default timezone on 
> sources.
> 
> It is a little awkward that programs using libecal will have to know the 
> Olson timezone string.  Right now I don't see any way around this since 
> the Olson zone is required to get the icaltimezone.  The icaltimezone is 
> needed in two places, primarily:
> 
>   * to call e_cal_set_default_timezone()
>     which is then used to generate instances
> 
>   * manually parsing DATE and DATE-TIME properties
>     which then uses icaltime_as_timet_with_zone()
> 
> It seems much easier to compute the offset from UTC directly from the 
> localtime than it is to keep track of the Olson string.
> 
> It should be possible to create a utility function to return the 
> icaltimezone given the offset from UTC and the DST flag, right?

Its possible to create a list of those zones that match but you can
never be sure because you don't have information about when DST changes
back and forth.

> If we have this then it might be appropriate for sources to default to 
> the system timezone instead of UTC.

What we really need is a desktop wide timezone setting IMHO.

> I guess a better solution would be to get the Olson string from the 
> system but there doesn't seem to be a reliable way to do that.

I don't believe so, which is why libical has its own zone info.

-JP
-- 
JP Rosevear <jpr novell com>
Novell, Inc.




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