I'm having a problem with adding exceptions to repeating dates. Basically I'm trying to add an exception which removes 4th September, but 4th September is still there after I click save. When I go into edit the content again, the exception is now set to 3rd September. I can switch this to the 5th, which makes the 4th an exception, but I would need to do this each and every time I edit the content type.

I'm thinking this is likely to be a bug, rather than something I'm doing wrong, but if that is the case please let me know!

I'm using the latest dev versions of both Date and Calendar.

Comments

jakob lund’s picture

I'm having the same problem with version 7.x-2.0-alpha4.

This should be trivial to fix for someone who is familiar with the module code?

thomas bosviel’s picture

Subscribe

DeNelo’s picture

I have the problem too. Subscribing.

eigilb’s picture

Priority: Normal » Major

This bug is also reported by http://drupal.org/node/1249808
The developer couldn't reproduce the bug and set the status to postponed.

In a test case I tried with repeating dates on thursdays every week from the 15. of september with the last date 27. of october except for thursday 6. of october.
To achieve that I need to set the exception date to 7. of october and the end date to 28. of october. My timezone is "Europe/Oslo" which is UTC+2h. The first start/end pair are entered as 2011-09-21:00 to 23:00. The following is the first record recorded to the database, following by the other dates except the exception date:

(field_rep_date_value+field_rep_date_value2+field_rep_date_rrule)
2011-09-15 19:00:00+11-09-15 21:00:00+RRULE:FREQ=WEEKLY;INTERVAL=1;UNTIL=20111027T220000Z;WKST=MO
EXDATE:20111006

When read back both in both view and edit mode the result looks correct. I suspect the same problem applies to additional dates.

In another try I set the site timezone to "Atlantic/Reykjavik" (UTC + 0000).

A temporary workaround will then be to set the site timezone to UTC. Try "Atlantic/Reykjavik" (UTC + 0000) I don't know if Reykjavik uses daylight saving time, so prepare for a surprise when summer ends.

As the test shows the bug apparently has to do with the timezone calculation. The date or the calendar module (who knows) stores the date in a UTC format, possibly correct.

I wish this can be fixed. This bug is a candidate for real trouble to a production site when editing is left to a secretary.

thomas bosviel’s picture

Status: Active » Needs review
StatusFileSize
new1.11 KB

This patch add EXDATE and RDATE with time zone reference.

Rob Carriere’s picture

I can confirm this patch fixes the problem at the site where I was experiencing it.

drupal 7.8
date 7.x-2.0-alpha4

Date settings:
First date of the week: monday
Use ISO-8601 week numbers: yes
Time zone: Europe/Amsterdam (+0200)
User may set their own time zone: no

Field settings:
field is mandatory
field has no default value
repeat options are shown by default
date entry options: 11 Oct 2011 - 23:11
[NOTE: this is suspect: I'm wrting this at 11:11, not 23:11. Date on the web server and on my desktop are set correctly.)
starting year: -3 years from now
ending year: +3 years from now
time increments: 1 minute
date labels positioned: above
Date attributes to collect: year/month/day/hour/minute
Collect end date: no
Time zone handling: site's time zone
Widget: pop-up calendar with repeat options

karens’s picture

Status: Needs review » Postponed (maintainer needs more info)

I followed the example in #6 exactly using the latest -dev version (NOT alpha4, which is not the latest code and does not have all the fixes) and everything worked correctly.

Please test this using the very latest -dev version of the code. If you still have problems there I need more information, including the version of PHP you are using.

ecoluke’s picture

I'm also getting this issue. I tried applying the patch to the 7.x-2.x dev release (which I'm using) and it didn't change anything.

When you pick a date and save a node it then displays the previous date on the node. If I edit the node it still shows the date I chose selected. I have the timezone set to Europe / London +00:00.

I realise that this is not a proper / full bug report but as I found other people experiencing this I thought I would just say that I am too! :#

karens’s picture

#8 is a completely different issue, please don't mix that into this one. This is an issue about using the 'Exceptions' option on repeating dates.

karens’s picture

Status: Postponed (maintainer needs more info) » Active

OK, I finally found a way to replicate this so I can work on it.

karens’s picture

This is another issue that is going to collide with #1354606: Date Repeat user interface improvements. I need to wait for that to hit and then see what still needs to be done.

karens’s picture

Status: Active » Fixed

OK, I figured out what needed to be fixed. It was a combination of things.

http://drupalcode.org/project/date.git/commit/447edaf

temaruk’s picture

I can confirm that it fixes the problem. Saving, then reloading the edit form shows the originally entered date, so no timezone adjustment happens.

(( But while testing this, I found an other issue: #1365516: Start date is not excluded when an exception for it is set ))

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.

ecoluke’s picture

No #8 is this exact issue, sorry if I explained myself poorly.

I just tried downloading the latest dev but no joy - so I am guessing I need to apply this patch somehow: http://drupalcode.org/project/date.git/patch/447edaf or to install a different branch of the module? If so, is there any information on how to do this somewhere, I tried copying that text into a .patch file but that didn't seem to work?

ecoluke’s picture

Don't worry about it - I just manually made all the changes and it works :)

Thanks