HomeClusterLabs Projects

Low: tools: Bug cl#5032 - Fixes issue in iso8601 calculations.

Description

Low: tools: Bug cl#5032 - Fixes issue in iso8601 calculations.

The number of days in a month is not the same for every month.
This was not taken into account correctly when adding and subtracting
days. When adding or subtracting days that results in changing to
another month, the previous month's number of days would be used
rather than the updated month's number of days when calculating the new
date. For example, rolling back a day from Feb 01 would result in
Jan 28 instead of Jan 31. This patch addresses this by updating the
number of days in the current month dynamically as days are added
and subtracted. This also fixes an off by one error in the do_sub_field
macro which also attributed to calculations being inaccurate in the
reported issue.

Details

Provenance
David Vossel <dvossel@redhat.com>Authored on Mar 9 2012, 3:30 PM
Parents
rP756f6672fc6b: Merge with upstream
Branches
Unknown
Tags
Unknown

Event Timeline