[Linux-HA] Problems with Year 2007?

Andrew Beekhof beekhof at gmail.com
Thu Jan 4 04:58:42 MST 2007


On 1/2/07, Andrew Beekhof <beekhof at gmail.com> wrote:
> On 1/1/07, Christian Froemmel <froemmel at systemconcept.de> wrote:
> > On Mon, 1 Jan 2007, Marian Neubert wrote:
> >
> > Hello,
> >
> > > crm_verify[11179]: 2007/01/01_12:13:26 ERROR:
> > > ordinal_to_gregorian:iso8601.c Triggered non-fatal assert at
> > > iso8601.c:618 : a_date->has->yeardays
> >
> > I found at least for this assert the error in the code.
> >
> > In file "lib/crm/common/iso8601.c" starting on line 827 there is a check
> > for "rhs->tm_yday > 0":
> >
> >         if(rhs->tm_yday > 0) {
> >                 /* days since January 1 [0-365] */
> >                 lhs->yeardays = 1 + rhs->tm_yday;
> >                 lhs->has->yeardays =TRUE;
> >         }
> >
> > The comment inside the block is absolutely correct, so the first day of
> > year is 0 in tm-structs - and the block is never executed on every new
> > year of every year. I think it should read:
> >
> >         if(rhs->tm_yday >= 0) {
> >                 /* days since January 1 [0-365] */
> >                 lhs->yeardays = 1 + rhs->tm_yday;
> >                 lhs->has->yeardays =TRUE;
> >         }
>
> your assesment looks to be spot-on... i'll verify it with some testing
> tomorrow and apply it asap

pushed out as:
   http://hg.beekhof.net/lha/crm-stable/rev/5c9c99904044


More information about the Linux-HA mailing list