I'm debugging a new failure in DateTime::Set t/15time_zone.t.
It fails with an infinite loop in this recurrence:
my $months = DateTime::Set->from_recurrence(
recurrence => sub {
$_[0]->truncate( to => 'month' )->add( months => 1 );
}
)
->set_time_zone( 'Asia/Taipei' );
After adding the following debugging code:
my $dt = $_[0]->clone;
print $dt->datetime,'T',$dt->hms,"\n";
$dt->truncate( to => 'month' );
print $dt->datetime,'T',$dt->hms,"\n";
$dt->add(months=>1);
print $dt->datetime,'T',$dt->hms,"\n";
print "\n";
I got:
2001-11-22T00:00:00T00:00:00
2001-11-01T00:00:00T00:00:00
2001-12-02T00:00:00T00:00:00
2001-12-02T00:00:00T00:00:00
2001-12-01T00:00:00T00:00:00
2001-12-31T00:00:00T00:00:00
2001-12-01 + 1 month = 2001-12-31
- Flavio S. Glock