> On Thu, Sep 02, 2010 at 01:24:03PM -0400, Metz, Bobby wrote:
> > You can add the current year to your string value prior to parsing.
> 
> Thanks. I'll adopt the DateTime based version in your second mail.

You're welcome.

> 
> > Of course you could also alter you syslog config to include the year,
> > right?
> 
> It's more complicated than that. This is part of some generalized code
> to process a whole bunch of different weird timestamps coming in
> through Syslog, and the BSD classic one was the one which was causing
> me problems because the others were working. They were commented out in
> the parser array to make the code easier to debug and explain in the
> post. Some of the dates and times in the message header could be fixed,
> but the ones inside the message themselves are stuck as they are.

Understood.  For some reason, I was thinking local syslog messages only when 
suggesting that.  Being a network guy I should have considered remote sources 
not always being the same, thus dealing with all the possible formats is the 
only practical approach.

Reply via email to