[Linux-HA] Problems with Year 2007?

Andrew Beekhof beekhof at gmail.com
Tue Jan 2 15:33:00 MST 2007


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

> > crm_verify[11179]: 2007/01/01_12:13:26 ERROR:
> > convert_from_ordinal:iso8601.c Triggered non-fatal assert at
> > iso8601.c:609 : ordinal_to_gregorian(a_date)
> > crm_verify[11179]: 2007/01/01_12:13:26 ERROR: ha_set_tm_time:iso8601.c
> > Triggered non-fatal assert at iso8601.c:849 : rhs->tm_mon < 0 ||
> > lhs->months == (1 + rhs->tm_mon)
>
> This think those asserts are side-effects of the above error, since the
> function "ordinal_to_gregorian()" fails in the first assert.. But I am not
> 100% sure.
>
> But the 100%-solution is: don't work on new years day ;-)
>
> Regards,
> Christian
> --
> SYSTEM CONCEPT GmbH
> Systemadministration/Netzwerk
> _______________________________________________
> Linux-HA mailing list
> Linux-HA at lists.linux-ha.org
> http://lists.linux-ha.org/mailman/listinfo/linux-ha
> See also: http://linux-ha.org/ReportingProblems
>


More information about the Linux-HA mailing list