Subject: | DateTime::Precise.set_time() fails in Januarys |
DateTime::Precise->set_time() has a bug in it that I had worked around last year. But now, in month 1 of this year, even the workaround breaks, too.
inc_month($increment) defaults $increment to 1, which is the root of the problem. It makes it impossible for set_time() to set a time in January. I think the correct solution is the following patch to set_time() (from line 792).
# Otherwise we're using a special key.
# Set time to the month.
$key eq 'B' and do {
my $_mon = $arg - 1;
$work->inc_month($_mon) if $_mon > 0;
next;
}