ClusterLabs/pacemaker — pull request #44 by davidvossel (2012-03-09 20:32:44+00:00)
Title: 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.