Skip to content

z/OS SMF84FMT.c leap year error #274

Description

@ma01417

Hi,
I've foun a little problem in the format_smfdate() function, the following code snippet don't consider all leap years:

  /* convert julian date into sane date */
  if ((year % 4 == 0) && ((year % 100 == 0) && (year % 400 == 0)))
    month_days[1] += 1;

I suggest the correction :

  /* convert julian date into sane date */
  if ((year % 4 == 0) && **!**((year % 100 == 0) && (year % 400 == 0)))
    month_days[1] += 1;

TIA

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions