You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@flume.apache.org by Roshan Naik <ro...@hortonworks.com> on 2016/02/25 22:15:00 UTC

Leap year : Date parsing in SyslogParser used by MultiportSyslogTCP source

Recently found a DateTime computation in issue FLUME-2889 which might affect dates when leap year is involved.

Given that 2016 is a leap year, I am trying to assess the impact of this bug.

Method SyslogParser.parseRfc3164Time()  appears to be actually adjusting the year in the date that it is parsing.. It adds to subtracts 1 year to the parsed date based on the current system datetime.

Questions:
1 - Why is it trying to modify the year on the parsed date instead of just using It as is ?
2 - On a flume agent that retains this bug... Intuitively it seems like this will likely cause incorrect dates in data. Leading to messed up data. Would  that  be right ?

-roshan

Re: Leap year : Date parsing in SyslogParser used by MultiportSyslogTCP source

Posted by Hari Shreedharan <hs...@apache.org>.
I am looking at your patch now.

On Thu, Feb 25, 2016 at 1:15 PM, Roshan Naik <ro...@hortonworks.com> wrote:
> Recently found a DateTime computation in issue FLUME-2889 which might affect dates when leap year is involved.
>
> Given that 2016 is a leap year, I am trying to assess the impact of this bug.
>
> Method SyslogParser.parseRfc3164Time()  appears to be actually adjusting the year in the date that it is parsing.. It adds to subtracts 1 year to the parsed date based on the current system datetime.
>
> Questions:
> 1 - Why is it trying to modify the year on the parsed date instead of just using It as is ?
> 2 - On a flume agent that retains this bug... Intuitively it seems like this will likely cause incorrect dates in data. Leading to messed up data. Would  that  be right ?
>
> -roshan