date parser for bind log dates
kcd at daimlerchrysler.com
Wed Mar 16 23:19:02 UTC 2005
Seems to work for me:
% cat /tmp/testparse.pl
$foo = "16-Mar-2005 18:16:20.330";
$bar = localtime(str2time($foo));
Wed Mar 16 18:16:20 2005
I'm using the 2.27 version of Date::Parse here...
Lindy Foster wrote:
>I'm looking for something that will parse the style of dates used
>in bind logging. They are:
>Date::Parse doesn't appear to handle this. I could write it,
>but if it already exists....
>I want to use this with LogWatch, so if anyone has dnssec logwatch
>filters, I'd be interested in those too. I have some written, so if anyone
>is interested, I'll let you know when I'm done with the date stuff.
>lindy at tislabs.com
More information about the bind-users