I have a date field using the Date Pop-up, and the Repeat Until widget. The granularity is set to Days only (no time fields), and there is no timezone conversion set.
In many cases if I enter an "Until" date of e.g. 31st March 2009, the system makes the correct number of entries in the content_field_repeatdate table (i.e. up to and including 31st March), but encodes the RepeatRule with an Until value of 30th March.
There are some exceptions when it gets it right - I have not bottomed out the exact circumstances.
Regards, Tony
Comments
Comment #1
WiredRogue commentedI am having a similar issue:
The event I encountered the problem with runs from April 15th to May 3rd everyday except Mondays.
In the "Occurrence From date" field I entered 04/15/2009. In the Repeat section, I selected "Every" and "Day(s)" in the drop-down menus and selected 05/03/2009 in the "Until" field.
In the Advanced section I selected "Every Sunday, Tues, Wed, Thurs, Fri, Sat".
The problem occurs when I hit Preview and view the days it has selected. The preview doesn't select May 1 and 2 (Fri. and Sat.). I have to go back under the Advanced section and select "First Friday and Saturday" for those to be included.
I did a little examining and expanded the range to the following Sunday (May 10th). It, again, skipped May 1 and 2 but catch the next Fri. & Sat (8 and 9).
Comment #2
Anonymous (not verified) commentedShould have been reported against 6.x-2.0-rc6 the first time. Apologies.
Tony.
Comment #3
karens commentedCheck the time on the 'Until date', if it is set to midnight it will leave out the last date since it stops looking at that point. Also try the latest version of the code. There have been lots of changes since rc6 (I hope to get a new release out today or tomorrow).
Comment #4
Anonymous (not verified) commentedI am not using the time, so it has indeed been defaulting to 00:00:00. But I am getting extra repeats, not leaving some out.
E.G.
1. If I enter a Repeated Date from today (19/2/09) to 26/2/09 it works correctly.
2. If I enter a Repeated date from 5/2/09 to 28/2/09 it works correctly.
3. 3/3/09 to 29/3/09 puts in an extra repeat on 30/3
4. If I default the From Date to Relative with a value "23:59", it sets the Until date in the database to have a time part of "230000", but leaves the actual date value field at 00:00:00. I still get exactly the same effect as in (1) and (3) above (did not try (2)).
I don't think this is quite the same problem therefore.
I will indeed look at the next release, when available.
Regards, Tony.
Comment #5
Anonymous (not verified) commentedKaren,
I am still getting this problem with the dev release issued on 2/3/2009. Circumstances are a bit complex, but these are some observations:
A newly created Date field, using Repeat Date popup. Granularity is set to Days only, and therefore No Timezone Conversion also set. Default value is blank, To date is set to "Never", and no To default is used.
All the following are Repeat Every Day, with no Exceptions and no Advanced options.
Enter 7th March 2009 UNTIL 16/3/09 -- All OK.
Enter 7/3/09 Until 31/3/09 -- Looking at the database I see:
Repeat Rule: RRULE:FREQ=DAILY;INTERVAL=1;UNTIL=20090330T230000Z;WKST=SU
i.e. until 23:00 on 30/3/09, not as previously 00:00 on the correct date.
Repeated entries from 7/3/09 00:00 to 31/3/09 00:00 (which is correct).
Enter 7/3/09 Until 30/3/09 -- Looking at the database I see:
Repeat Rule: RRULE:FREQ=DAILY;INTERVAL=1;UNTIL=20090329T230000Z;WKST=SU
i.e. until 23:00 on 29/3/09.
Repeated entries from 7/3/09 00:00 to 30/3/09 00:00 (which is correct).
Enter 7th March 2009 UNTIL 29/3/09 -- All OK.
I have tried the following UNTIL dates in May 09, and all show the same error: 10, 20, 27, 28, 29, 30, 31.
--------------
If I include a To date as well as From date, on a couple of examples tested it shows the same miscalculation as the Until date above (i.e. sets to 23:00 on the day before).
--------------
If I include Hours & Minutes granularity, I observe the following for From 7/3/09 To 31/3/09:
With the input time set to 12:00 for both From date and Until date:
The Until rule has the time set to 11:00
The repeated date values are all set to 12:00, except the last three (29, 30, 31st) which are set to 11:00.
BUT when displayed using the default format they ALL show as 12:00
With the input time set to 00:00 for both From date and Until date:
The Until rule has the time set to 23:00 on the 30th (as above)
The repeated date values are all set to 00:00, except the last two (which should be 30th, 31st) which are set to 23:00 on 29th and 30th respectively..
BUT when displayed using the default format they ALL show as "All Day" on the correct date.
---------------
I hope this is of use.
Regards, Tony.
Comment #6
Anonymous (not verified) commentedI have just fallen in!!
This is a Summer Time problem. If I set the global Locale for the site to be "No timezone" the problem all goes away.
However there is still a bug there since if I want to use times on some fields, and not on others, it won't let me.
Specifically, the code which formats the "Until" date from the Repeat Rule seems not to apply the local timezone correction, and therefore gets the day wrong. (This correction does seem to be applied to all other outputs, including the "Except" dates also taken from the Repeat Rule.)
Regards, Tony
Comment #7
blackdog commentedI can confirm this is still an issue.
We have a repeating date field without time, and while the list of dates are correct, the Until string ends one day early.
Comment #8
arlinsandbulte commented39 weeks of no activity while at "postponed (maintainer needs more info)"
I am marking as closed, but feel free to re-open if it is still an issue for you.
Comment #9
blackdog commentedThis is still an issue.
The field has no Timezone conversion, and the sites' timezone is set to Stockholm. When adding a repeating event, the list of events is correct, but the string that describes it gets it one day wrong, it ends one day early.
Comment #10
gpk commentedSince the smallest granularity for repeating date values is 1 day, it makes no sense to include the time in the "repeat until" widget, and simply confuses users who think that the date (event in our case) will repeat up until (i.e. including) the date they enter.
Comment #11
vitis commentedsub
Comment #12
Exploratus commentedStill an issue.... Time should not have to be input on this field. Very confusing for users... Event occurs on whatever day at whatever time, until a certain date. (you shouldnt have to put time again)
Comment #13
kalebheitzman commentedHaving the same issue. When parsing in external calendars, the repeat date gets cut off 1 day short because the calendaring system (Zimbra) is set to end dates at midnight.
Comment #14
kalebheitzman commentedDiscovered a solution for this in my case. I use a cck date field for my calendaring on http://www.asburyseminary.edu/calendar. It looks like the timezone was being converted three times (??) and was causing 12:00am cutoff dates to be taken back by 4 hours causing the event to fall 4 hours short of reaching the next day (hence the missing last day). I set my cck field to UTC time instead of Site Timezone and if fixed the issue.
Comment #15
gpk commentedThe time input field on Until (or Except fields) has been removed: #337666: Repeat Until date->time defaults to 12:00AM - should be 11:59PM (and so the Repeat is not inclusive of the "repeat until" date).
A number of other related but different issues also appear to be mentioned in this topic. Since there have been many fixes over the past couple years I'm marking this as closed (fixed), and suggest a new issue is opened to deal with any continuing problems.
Comment #16
debo7debo commentedThe same problem occurs in the 7.x version. I need a fix asap. I tried to examine the similarities between the 6.x and 7.x codes and find a solution, but they don't look the same at all.
Comment #17
gpk commentedactually this still hasn't been fixed in 6.x, changing status to dupe of #337666: Repeat Until date->time defaults to 12:00AM - should be 11:59PM (and so the Repeat is not inclusive of the "repeat until" date). The 7.x fix is in #1267046: "repeat until ..." doesn't show the last repeat.