[syslog-ng] Trouble with timezone()

anthony lineham anthony.lineham at alliedtelesis.co.nz
Thu Dec 7 20:58:11 CET 2006


I saw it in the html documentation that came with 2.0rc3, in Table 3.6.
Common options for destination drivers.
Here is the text:
timezone()  timezone offset in seconds  unspecified   Convert
timestamps to a different timezone as specified by this option. If this
option is not specified then the original timezone information in the
message is used. 

Is the name of the option also incorrect? I noticed you referred to
"time_zone" rather than "timezone". Both are present in the
documentation that I have.

Also can you suggest how I can deal with a time offset of greater than
+/- 12 hours?

Thanks
Anthony


>>> Balazs Scheidler <bazsi at balabit.hu> 7/12/2006 9:18 p.m. >>>
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

_______________________________________________
syslog-ng maillist  -  syslog-ng at lists.balabit.hu 
https://lists.balabit.hu/mailman/listinfo/syslog-ng 
Frequently asked questions at http://www.campin.net/syslog-ng/faq.html





More information about the syslog-ng mailing list