[syslog-ng] Trouble with timezone()

Balazs Scheidler bazsi at balabit.hu
Mon Dec 11 12:12:51 CET 2006


On Mon, 2006-12-11 at 09:18 +1300, anthony lineham wrote:
> Thanks for the patch. I downloaded the latest snapshot and it now
> accepts values greater than 12 hours.
> However, there seems to be a new bug introduced. I now get an error
> message logged regardless
> of the time offset I enter.
> eg
> 2006 Dec 11 09:09:23 syslog.err syslog-ng[67]: Bogus timezone spec,
> must be in the format [+-]HH:MM, offset must be less than 24:00;
> value=\'05:00\'
> 
> This seems to be due to the removal of the return TRUE in the patch and
> latest snapshot
> -       if (hours <= 12 && mins <= 60)
> +      if ((hours < 24 && mins <= 60) || (hours == 24 && mins == 0))
>          {
>            *timezone = sign * (hours * 3600 + mins * 60);
> -           return TRUE;
>          }
> 

Oops, sorry. You are right, I have removed the return TRUE statement by
accident. I've committed a fix.

-- 
Bazsi



More information about the syslog-ng mailing list