Skip Menu |

This queue is for tickets about the DateTime-Precise CPAN distribution.

Report information
The Basics
Id: 148
Status: new
Priority: 0/
Queue: DateTime-Precise

People
Owner: Nobody in particular
Requestors: glenwood [...] alumni.caltech.edu
Cc:
AdminCc:

Bug Information
Severity: Important
Broken in: (no value)
Fixed in: (no value)



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; }
[GLENNWOOD - Thu Jan 17 09:23:06 2002]: Show quoted text
> 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; > }
Hi, Do you have example code of how to reproduce the bug? How is set_time being used? Best, Blair