Re: [evolution-patches] patch for bug #60463 calendar



On Wed, 2004-06-30 at 17:59 +0200, Jerome Lacoste wrote:
> On Wed, 2004-06-30 at 11:58, Rodrigo Moya wrote:
> > On Tue, 2004-06-29 at 13:53 +0200, Jerome Lacoste wrote:
> > > On Tue, 2004-06-29 at 12:51, chenthill wrote:
> > > > hi,
> > > >   Attached a patch which gets the default zone as an extra argument,
> > > > converts the freebusy time to the default timezone using the function
> > > > icatime_from_timet_with_zone() . It was not showing some of the freebusy
> > > > times before, since no conversion from UTC timezone to default timezone
> > > > was made.
> > > > 
> > > > thanks, chenthill
> > > 
> > > THings like
> > > 
> > > -  itt = icaltime_from_timet (t, 0);
> > > +  if (default_zone)
> > > +     itt = icaltime_from_timet_with_zone (t, 0, default_zone);
> > > +  else
> > > +     itt = icaltime_from_timet_with_zone (t, 0, 0);
> > >    ipt.start = itt;
> > >  
> > > 
> > > Could be rewritten without making 2 calls to the same method.
> > > 
> > no, if you send a NULL timezone to icaltime_from_timet_with_zone, it
> > will probably crash. As I said in my previous mail, you should be using
> > icaltime_from_timet when there's no timezone.
> 
> I meant using an intermediate variable. Something along:
> 
> -  itt = icaltime_from_timet (t, 0);
> +  int zone = (default_zone ? default_zone : 0);
> +  itt = icaltime_from_timet_with_zone (t, 0, zone);

Missing the point - rodrigo is saying you have to call a different
function if default_zone == NULL, so you can't combine the statements.

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




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