'when' parameter parsed incorrectly for day of month < 10
I've got a backup which is supposed to run on the first of the month, but which has not been doing so. I've tracked it down to a bug in function isnow()
in src/backupninja.in. The date function used to calculate nowday
gives a zero-padded 2 digit day number, while the mechanism for calculating whenday
does not do the zero-padding, so the comparison fails.
I've attached a diff, which I think is correct, but I've yet to test it fully, as I'm not yet sure how to do that without waiting for the date to roll around. Stepping through line by line in bash, and assuming the @SED@ substitution behaves as I expect, it looks fine.
(from redmine: created on 2015-05-13)