[syslog-ng] Trouble with timezone()

Balazs Scheidler bazsi at balabit.hu
Thu Dec 7 09:18:54 CET 2006


On Thu, 2006-12-07 at 15:09 +1300, anthony lineham wrote:
> Hi,
> 
> I'm trying to convert the time information in messages so they match
> the timezone offset of a remote device. Initially I was using
> time_zone(). This seemed to work ok until I tried and offset of greater
> than 12hours, which failed. It occurred to me that this utility is
> intended convert messages initially with GMT time to a GMT +/- offset
> time hence only +/-12 is required.
> 
> What I want to be able to do is make a coversion relative to local
> time, so I need to be able to handle an offset of up 23 hours. I'm
> trying to use timezone(), which is supposed to take an offset value in
> seconds. However I can't work out the syntax.
> For a 2 hour offset I've tried:
> timezone(7200)
> timezone("7200")
> timezone("+7200")
> timezone(+7200)
> 
> For each of these I get config parsing errors.

The format of the time_zone argument is [+/-]HH:MM, where did you read
about seconds? I'd like to fix it if you found this in the
documentation.

-- 
Bazsi



More information about the syslog-ng mailing list