To reproduce create a node with a cck date field with a repeat rule of RRULE:FREQ=DAILY;INTERVAL=1;BYDAY=MO,TU,WE,TH,FR,SA;UNTIL=20091231T080000Z;WKST=MO

(every day except sunday) starting from 2009-03-28

Then create a view with an argument of 2009-03-01--2009-04-08

Notice that there are rows for 3/28, 3/30, 3/31 then nothing until 4/06 - what happened to 4/1 thorough 4/4?

The dates show correctly when viewing the node itself.

Using the 3/27 dev tarball

Comments

gpk’s picture

Priority: Normal » Critical

Confirming this bug for a repeat rule of Monday - Saturday. The repeats only show up in the calendar (whether it be daily, weekly, monthly calendar) from the first Monday of the month.

Using dev tarball of Apr 13, 2009. PHP 5.2.8. Tried all the troubleshooting steps, and also tried with a fresh content type and a new View. Problem certainly occurs with datetime and date field types; have not tried datestamp.

Possible related issues:
#370761: Repeats every first Sunday missed out June 2009
#369020: "Every First Saturday" skips Feb, March

This problem started for me within the last couple of weeks. Whether it was as a result of upgrading from 2.0-rc6 to 2.0 or the change to DST I can't say.

gpk’s picture

Title: Repeating date not correctly showing in view » Repeating date not correctly showing

Modified title - as well as not showing in view, also the dates shown on the node page are missing the same dates.

cangeceiro’s picture

I am getting this same behaviour with version 5.x-2.6 with the repeat rule RRULE:FREQ=DAILY;INTERVAL=1;BYDAY=FR,SA;BYMONTHDAY=1,2,24,25;UNTIL=20090503T000000;WKST=SU only april 24th and may 1st show up as dates.

Levure’s picture

We are getting exactly the same problem since upgrade to version 6.2.1 of the Date module.

This problem make our calendar view being completely empty.

ericm’s picture

I'm having problems with the repeat rule not calculating the correct dates, on a production site with Date 6.x-2.0-rc6, which I believe is the same or a closely related problem to what jpp, gpk and cangeceiro describe. I setup a sandbox Drupal installation to see if I could repeat the errors from my production site, this time with the latest -dev versions of Date, Views, and CCK installed. I got the same errors, described here in detail. It appears to be similar to the issue "#319452: Dates are missing for repeated dates", in that it seems to primarily be a problem with calculating the dates based on a given rule, although that issue was fixed.

1. Started with a fresh Drupal 6.10 installation (PHP 5.2.9, mySQL 5.1.33)
2. Installed CCK module (6.x-2.x-dev 2009-Apr-16), and enabled Content, Text and Number.
3. Installed Views module (6.x-2.x-dev 2009-Apr-12), and enabled Views and Views UI
4. Installed Date module (6.x-2.x-dev 2009-Apr-13), and enabled Date API, Date, Date Repeat API, Date Timezone, and Date Popup
5. Set local timezone (admin/settings/date-time) to America/Toronto (which is GMT-5), User-configurable time zones: disabled, First day of week: Sunday
6. Created a new Content Type "Event, repeating" (event_repeating).
7. Added a repeating date field to the new content type (admin/content/node-type/event-repeating/fields), labeled "Date, repeating", fieldname "field_datetime_repeating", data type "Datetime", and form element for editing "Text Field with Date Popup and Repeat options".
8. Left remaining values as defaults except for Global settings where I checked "Required", and made the "To" date "optional" (instead of "never").
9. Created a new "Event, repeating" node "Test1" with initial date "2009-03-05 19:30" and repeats every month the first Thursday (left the "To" date blank, set to Repeat "Every" and "Months" and under "Advanced" selected "Month:Any", "Day of Month: Any", and "Day of Week: First Thursday").
10. Got a big set of end-user-frightening error messages and a red box around the "Until" date, which apparently has to be explicitly set. The error messages were:

* warning: date_timezone_set() expects parameter 1 to be DateTime, null given in C:\xampp\htdocs\drupal.local\sites\sandbox.local\modules\contrib\date\date_api_ical.inc on line 568.
* warning: date_format() expects parameter 1 to be DateTime, null given in C:\xampp\htdocs\drupal.local\sites\sandbox.local\modules\contrib\date\date_api_ical.inc on line 654.
* warning: date_timezone_set() expects parameter 1 to be DateTime, null given in C:\xampp\htdocs\drupal.local\sites\sandbox.local\modules\contrib\date\date_api_ical.inc on line 568.
* warning: date_format() expects parameter 1 to be DateTime, null given in C:\xampp\htdocs\drupal.local\sites\sandbox.local\modules\contrib\date\date_api_ical.inc on line 654.
* The UNTIL value is required for repeating dates.
* warning: Cannot use a scalar value as an array in C:\xampp\htdocs\drupal.local\sites\sandbox.local\modules\contrib\date\date\date.module on line 452.
* warning: Cannot use a scalar value as an array in C:\xampp\htdocs\drupal.local\sites\sandbox.local\modules\contrib\date\date\date.module on line 453.
* warning: Cannot use a scalar value as an array in C:\xampp\htdocs\drupal.local\sites\sandbox.local\modules\contrib\date\date\date.module on line 454.
* warning: Cannot use a scalar value as an array in C:\xampp\htdocs\drupal.local\sites\sandbox.local\modules\contrib\date\date\date.module on line 452.
* warning: Cannot use a scalar value as an array in C:\xampp\htdocs\drupal.local\sites\sandbox.local\modules\contrib\date\date\date.module on line 453.
* warning: Cannot use a scalar value as an array in C:\xampp\htdocs\drupal.local\sites\sandbox.local\modules\contrib\date\date\date.module on line 454.

11. I set the "Until" date to Feb 04 2011-02-04 (no time specified), and saved again, and this time got the node created and no error messages.

The node display shows:

Date, repeating:
Repeats every month on the first Thursday until Fri Feb 04 2011 .
Thu, 2009-03-05 19:30
Thu, 2009-04-02 19:30
Thu, 2009-06-04 19:30
Thu, 2009-07-02 19:30
Thu, 2009-08-06 19:30
Thu, 2009-09-03 19:30
Thu, 2009-10-01 19:30
Thu, 2009-11-05 19:30
Thu, 2009-12-03 19:30
Thu, 2010-02-04 19:30
Thu, 2010-03-04 19:30
Thu, 2010-04-01 19:30
Thu, 2010-05-06 19:30
Thu, 2010-06-03 19:30
Thu, 2010-07-01 19:30
Thu, 2010-08-05 19:30
Thu, 2010-09-02 19:30
Thu, 2010-11-04 19:30
Thu, 2010-12-02 19:30
Thu, 2011-01-06 19:30
Thu, 2011-02-03 19:30

The RRULE from the "content_field_datetime_repeating" table of the database is: RRULE:FREQ=MONTHLY;INTERVAL=1;BYDAY=1TH;UNTIL=20110204T050000Z;WKST=SU
and the "field_datetime_repeating_value" is "2009-03-06 00:30:00" (field_datetime_repeating_value2 is the same). These fields all look fine to me.

ERROR: It is missing 2009-05-07, 2010-01-07, and 2010-10-07.

12. I created a set of other repeating date nodes (matching the ones for which I have errors on my production site)...

====================
Node: Test2
Nov 13 2008 7:30pm America/Toronto, repeats every month second Thursday until Thu Oct 13 2011

The node display shows:

Date, repeating:
Repeats every month on the second Thursday until Thu Oct 13 2011 .
Mon, 2008-11-03 19:30
Thu, 2008-11-13 19:30
Thu, 2008-12-11 19:30
Thu, 2009-01-08 19:30
Thu, 2009-02-12 19:30
Thu, 2009-03-12 19:30
Thu, 2009-04-09 19:30
Thu, 2009-05-07 19:30
Thu, 2009-06-11 19:30
Thu, 2009-07-09 19:30
Thu, 2009-08-13 19:30
Thu, 2009-09-10 19:30
Thu, 2009-10-08 19:30
Thu, 2009-11-12 19:30
Thu, 2009-12-10 19:30
Thu, 2010-01-07 19:30
Thu, 2010-02-11 19:30
Thu, 2010-03-11 19:30
Thu, 2010-04-08 19:30
Thu, 2010-05-13 19:30
Thu, 2010-06-10 19:30
Thu, 2010-07-08 19:30
Thu, 2010-08-12 19:30
Thu, 2010-09-09 19:30
Thu, 2010-10-07 19:30
Thu, 2010-11-11 19:30
Thu, 2010-12-09 19:30
Thu, 2011-01-13 19:30
Thu, 2011-02-10 19:30
Thu, 2011-03-10 19:30
Thu, 2011-04-07 19:30
Thu, 2011-05-12 19:30
Thu, 2011-06-09 19:30
Thu, 2011-07-07 19:30
Thu, 2011-08-11 19:30
Thu, 2011-09-08 19:30

field_datetime_repeating_rrule is: RRULE:FREQ=MONTHLY;INTERVAL=1;BYDAY=2TH;UNTIL=20111013T040000Z;WKST=SU

ERROR: It is showing 2009-05-07 instead of 2009-05-14, 2010-01-07 instead of 2010-01-14, 2010-10-07 instead of 2010-10-14, 2011-04-07 instead of 2011-04-14, and 2011-07-07 instead of 2011-07-14.

====================

Node: Test3
Nov 4 2008 7:30pm America/Toronto, Repeats every month first Tuesday until Tue Oct 04 2011

The node display shows:

Date, repeating:
Repeats every month on the first Tuesday until Tue Oct 04 2011 .
Tue, 2008-11-04 19:30
Tue, 2008-12-02 19:30
Tue, 2009-01-06 19:30
Tue, 2009-02-03 19:30
Tue, 2009-03-03 19:30
Tue, 2009-05-05 19:30
Tue, 2009-06-02 19:30
Tue, 2009-08-04 19:30
Tue, 2009-09-01 19:30
Tue, 2009-10-06 19:30
Tue, 2009-11-03 19:30
Tue, 2009-12-01 19:30
Tue, 2010-01-05 19:30
Tue, 2010-02-02 19:30
Tue, 2010-03-02 19:30
Tue, 2010-04-06 19:30
Tue, 2010-05-04 19:30
Tue, 2010-06-01 19:30
Tue, 2010-07-06 19:30
Tue, 2010-08-03 19:30
Tue, 2010-10-05 19:30
Tue, 2010-11-02 19:30
Tue, 2011-01-04 19:30
Tue, 2011-02-01 19:30
Tue, 2011-03-01 19:30
Tue, 2011-04-05 19:30
Tue, 2011-05-03 19:30
Tue, 2011-07-05 19:30
Tue, 2011-08-02 19:30
Tue, 2011-09-06 19:30

field_datetime_repeating_rrule is: RRULE:FREQ=MONTHLY;INTERVAL=1;BYDAY=1TU;UNTIL=20111004T040000Z;WKST=SU

ERROR: Missing dates 2009-04-07, 2009-07-07, 2010-09-07, 2010-12-07, 2011-06-07.

====================

Node: Test4
Nov 18 2008 7:30pm America/Toronto, repeats every month third Tuesday until Tue Oct 18 2011

The node display shows:

Date, repeating:
Repeats every month on the third Tuesday until Tue Oct 18 2011 .
Tue, 2008-11-18 19:30
Tue, 2008-12-16 19:30
Tue, 2009-01-20 19:30
Tue, 2009-02-17 19:30
Tue, 2009-03-17 19:30
Tue, 2009-04-14 19:30
Tue, 2009-05-19 19:30
Tue, 2009-06-16 19:30
Tue, 2009-07-14 19:30
Tue, 2009-08-18 19:30
Tue, 2009-09-15 19:30
Tue, 2009-10-20 19:30
Tue, 2009-11-17 19:30
Tue, 2009-12-15 19:30
Tue, 2010-01-19 19:30
Tue, 2010-02-16 19:30
Tue, 2010-03-16 19:30
Tue, 2010-04-20 19:30
Tue, 2010-05-18 19:30
Tue, 2010-06-15 19:30
Tue, 2010-07-20 19:30
Tue, 2010-08-17 19:30
Tue, 2010-09-14 19:30
Tue, 2010-10-19 19:30
Tue, 2010-11-16 19:30
Tue, 2010-12-14 19:30
Tue, 2011-01-18 19:30
Tue, 2011-02-15 19:30
Tue, 2011-03-15 19:30
Tue, 2011-04-19 19:30
Tue, 2011-05-17 19:30
Tue, 2011-06-14 19:30
Tue, 2011-07-19 19:30
Tue, 2011-08-16 19:30
Tue, 2011-09-20 19:30

field_datetime_repeating_rrule is: RRULE:FREQ=MONTHLY;INTERVAL=1;BYDAY=3TU;UNTIL=20111018T040000Z;WKST=SU

ERROR: 2009-04-14 should be 2009-04-21, 2009-07-14 should be 2009-07-21, 2010-09-14 should be 2010-09-21, 2010-12-14 should be 2010-12-21, 2011-06-14 should be 2011-06-21.

====================

Node: Test5
Oct 28 2008 8:30pm America/Toronto, repeats every month last Tuesday until Tue Oct 25 2011

The node display shows:

Date, repeating:
Repeats every month on the last Tuesday until Tue Oct 25 2011 .
Tue, 2008-10-28 20:30
Tue, 2008-11-25 20:30
Tue, 2008-12-30 20:30
Tue, 2009-01-27 20:30
Tue, 2009-02-24 20:30
Tue, 2009-03-31 20:30
Tue, 2009-05-26 20:30
Tue, 2009-06-30 20:30
Tue, 2009-07-28 20:30
Tue, 2009-08-25 20:30
Tue, 2009-09-29 20:30
Tue, 2009-10-27 20:30
Tue, 2009-11-24 20:30
Tue, 2009-12-29 20:30
Tue, 2010-01-26 20:30
Tue, 2010-02-23 20:30
Tue, 2010-03-30 20:30
Tue, 2010-04-27 20:30
Tue, 2010-05-25 20:30
Tue, 2010-06-29 20:30
Tue, 2010-07-27 20:30
Tue, 2010-08-31 20:30
Tue, 2010-10-26 20:30
Tue, 2010-11-30 20:30
Tue, 2010-12-28 20:30
Tue, 2011-01-25 20:30
Tue, 2011-02-22 20:30
Tue, 2011-03-29 20:30
Tue, 2011-04-26 20:30
Tue, 2011-05-31 20:30
Tue, 2011-07-26 20:30
Tue, 2011-08-30 20:30
Tue, 2011-09-27 20:30

field_datetime_repeating_rrule is: RRULE:FREQ=MONTHLY;INTERVAL=1;BYDAY=-1TU;UNTIL=20111025T040000Z;WKST=SU

ERROR: Missing 2009-04-28, 2010-09-28, 2011-06-28.

====================

ericm’s picture

I just wanted to also provide the "field_datetime_repeating_value" field (for the DELTA=0 lines) from the "content_field_datetime_repeating" table of the database. The problem looks to me to be at least in part due to timezone conversion issues, e.g. node Test5 drops a month when the previous event is on the last day of the month (localtime) but the first day of the next month (GMT). The site's timezone is America/Toronto (GMT-5 standard, or GMT-4 with DST which is the case at the time of this writing).

node Test1
Start as localtime: 2009-03-05 19:30
field_datetime_repeating_value:
 2009-03-06 00:30:00
field_datetime_repeating_rrule:
 RRULE:FREQ=MONTHLY;INTERVAL=1;BYDAY=1TH;UNTIL=20110204T050000Z;WKST=SU

node Test2
Start as localtime: 2008-11-13 19:30
field_datetime_repeating_value:
 2008-11-14 00:30:00
field_datetime_repeating_rrule:
 RRULE:FREQ=MONTHLY;INTERVAL=1;BYDAY=2TH;UNTIL=20111013T040000Z;WKST=SU

node Test3
Start as localtime: 2008-11-04 19:30
field_datetime_repeating_value:
 2008-11-05 00:30:00
field_datetime_repeating_rrule:
 RRULE:FREQ=MONTHLY;INTERVAL=1;BYDAY=1TU;UNTIL=20111004T040000Z;WKST=SU

node Test4
Start as localtime: 2008-11-18 19:30
field_datetime_repeating_value:
 2008-11-19 00:30:00
field_datetime_repeating_rrule:
 RRULE:FREQ=MONTHLY;INTERVAL=1;BYDAY=3TU;UNTIL=20111018T040000Z;WKST=SU

node Test5
Start as localtime: 2008-10-28 20:30
field_datetime_repeating_value:
 2008-10-29 00:30:00
field_datetime_repeating_rrule:
 RRULE:FREQ=MONTHLY;INTERVAL=1;BYDAY=-1TU;UNTIL=20111025T040000Z;WKST=SU

P.S. node Test2 should have had a start date of Thu, 2008-11-13 19:30 not Thu, 2008-11-03 19:30 as shown in my initial post, but that was a typo on my part when creating the node (since fixed), and has no impact on the outcome.

P.P.S. I'm confused as to how node Test5 can show a start time one hour later than the other nodes in node view and the edit page (20:30 vs 19:30 localtime), but show the same start time (00:30:00) as the other dates in the "field_datetime_repeating_value" field of the "content_field_datetime_repeating" database table. But it really is that way.

ericm’s picture

I believe that Dave.Hirschman has tracked the source of my (and perhaps our) problem to a PHP 5.2.x bug, as described here (a comment in #369020: "Every First Saturday" skips Feb, March); also noted by aasarava here. Dave writes: "If date_modify is passed the last day of the month and asked to increment to the next Sunday, Monday, etc. and that day happens to be the last day of the month (as well as the 7th of the next month), date_modify does nothing - the date is not modified." My own problems all seem to be associated with last or the 7th days of the month.

I think this thread (#416942) is probably a duplicate of that one.

"#370761: Repeats every first Sunday missed out June 2009" is another duplicate with the same circumstances. A patch by aasarava that is basically a hack to deal specifically with the bug is here "#362926: February is Skipped When Repeat is "Every Month / Last Saturday"" but I haven't tried it.

karens’s picture

Status: Active » Closed (duplicate)

This is apparently the same problem as #369020: "Every First Saturday" skips Feb, March Let's consolidate on that issue.

gpk’s picture

For those following this issue there is a fix (see #369020: "Every First Saturday" skips Feb, March) for rules like ericm's problem at #5 which was that a "first Thursday" repeat didn't work. Now we just need to get the first Xxx-day showing when the rule is "every Xxx-day".

AjayBaji’s picture

can you show me what you say?It look like Xxx-domain,right?