date parser for bind log dates

Lindy Foster lindy at tislabs.com
Thu Mar 17 01:10:01 UTC 2005


Hey thanks! I looked at the perldoc for Date::Parse, and this wasn't one
of the formats shown as supported. Guess maybe I'd better check my
version, too, while I'm at it...

lindy

At 03:19 PM 3/16/2005, Kevin Darcy wrote:
>Seems to work for me:
>
>% cat /tmp/testparse.pl
>#!/usr/bin/perl
>
>use Date::Parse;
>
>$foo = "16-Mar-2005 18:16:20.330";
>
>$bar = localtime(str2time($foo));
>print "$bar\n";
>% /tmp/testparse.pl
>Wed Mar 16 18:16:20 2005
>%
>
>I'm using the 2.27 version of Date::Parse here...
>
>- Kevin
>
>
>Lindy Foster wrote:
>
>>I'm looking for something that will parse the style of dates used
>>in bind logging. They are:
>>
>>dd-Mon-yyyy hh:mm:ss.sss
>>
>>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.
>>
>>thanks,
>>
>>lindy foster
>>lindy at tislabs.com
>>
>>
>>
>>
>>
>>
>>  
>>




More information about the bind-users mailing list