Subject: | Month rollover logic wrong |
v0.02 fails the following test.
The code in next_time_field() mishandles the case where the given time
is beyond the last component of the month spec.
is_deeply [list_times '59 59 23 31 01,03 *', 3],
[ '2012-01-31 23:59:59',
'2012-03-31 23:59:59',
'2013-01-31 23:59:59' ], 'last second of the month';
The fix is to replace
$t->[$_] = 0 for 0 .. $idx-1;
with
$t->[$_] = $Min{$Fields[$_]} for TM_SEC .. $idx-1;
Best regards,
Nic