Off-by-one error in yearly reminder

Bug #747469 reported by Aaron Moman
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Email-reminder
Triaged
Medium
François Marier

Bug Description

I woke up this morning to this reminder:

Hi there,

I just want to remind you that [redacted] is turning 63 in 42 days (Friday May 13).

Have a good day!

However, the birthday is actually on May 14. Here is the relevant portion of the .email-reminders file:
    <event type="birthday">
      <name>[redacted]</name>
      <reminders>
        <reminder type="days before">42</reminder>
      </reminders>
      <day>14</day>
      <month>05</month>
      <year>1948</year>
    </event>

My best guess is that the error lies in this code from will_occur in YearlyEvent.pm:
    if ($modifier) {
        $modified_date = DateCalc($modified_date, " - $modifier days");
    }

Which would mean the error is probably in Date::Manip, but I didn't debug the code to find out.

Something I've checked (to make sure I'm not wasting your time):
There wasn't another entry in the file with a date of May 13th.

Summary: A reminder for 42 days before May 14th should fire on April 2nd, not April 1st. Also, it should remind me for May 14th not May 13th.

Revision history for this message
Aaron Moman (admoman) wrote :

In case it matters:
I have version 6.22 of Date::Manip installed for perl v5.10.1 (Ubuntu 10.10 package).
Email-reminders was installed via apt-get. Version 0.7.6.

Revision history for this message
François Marier (fmarier) wrote :

Interesting.

It could also be some sort of rounding error... I'll have a look, thanks for reporting this!

Changed in email-reminder:
assignee: nobody → François Marier (fmarier)
importance: Undecided → Medium
status: New → Incomplete
status: Incomplete → Triaged
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers