This problem is reported for D7 at: http://drupal.org/node/1254582. The problem also exists in the D6 version and needs to be fixed. Here is the description:
When you create 'additions' to repeating dates, they should get the same times as the original dates, instead they are getting set to midnight. The problem is some inconsistency in the code that is treating expections and additions slightly differently, plus a need to take the addition (which has no time) and adjust it to use the same time as the original date.
It was solved for D7. See diff.
I tried applying the patch manually but got the following error:
Fatal error: Class 'dateObject' not found in /home/saj/public_html/sites/all/modules/date/date_repeat/date_repeat_calc.inc on line 343.
I'd like to help but I need to be pointed in the right direction for a solution.
Thanks for this amazing module.
Shai Gluskin
| Comment | File | Size | Author |
|---|---|---|---|
| #2 | additions-time-fix-1300274-2.patch | 1.17 KB | Shai |
Comments
Comment #1
Shai commentedSolution found. @jerdavis wrote a patch which you can use to fix this problem. But the patch itself is broken. All lines with "+" need to be deleted and all lines with "-" need to be added. It's a very small patch though, so it's not too cumbersome to apply by hand.
I'll try to come back later and re-do the patch so it isn't reversed. But in the meantime, reverse + and - on the following patch and you'll have what you need to fix this problem now:
http://drupal.org/files/date_repeat_additions_have_wrong_time-1254582-6....
Shai
Comment #2
Shai commentedI've made the patch.
For people testing...
Before patching add a repeating date with a time that is not midnight. Add an addition. Upon save you'll see that the time for the addition is wrong.
Then apply the patch, and create a new repeating event (won't fix the event that has already been created) with an addition and confirm that the addition now shows the right time.
Comment #3
jameswoods commentedThanks for providing this patch 8^) If I can get it to work, this will be great for the site I'm building!
I'm running Date 6.x-2.7 and Date API 6.x-2.7 which seems to have different file structures than the patch is meant for.
I've got a date/date_repeat/date_repeat.module file but no date/date_repeat.inc file.
Is the Date 6.x-2.x-dev that radically different from 6.x-2.7? Or am I just missing something blatantly obvious here?
-James
Comment #4
Shai commented@jameswood,
There is no file structure change; the patch is written from the perspective of already being in the date directory. so the files are listed as:
date/date_repeat.inc file
and
date_repeat/date_repeat.module
If you were listing the paths from inside the modules directory it would look like:
date/date/date_repeat.inc
date/date_repeat/date_repeat.module
Maybe it is simpler to say like this: What is confusing is that there is a directory called "date that is inside the date module. That's confusing. They fixed that, I think, for D7.
All that being said however... you absolutely should upgrade to the dev version if you want this to work. The whole additions feature is very new. And I'd never want to apply a patch to an older version of something. You may not like to use Dev versions, but once you are patching live sites, you are living on the edge, so you might as well be orderly about it instead of applying a patch to a version it wasn't intended for.
Also, I have discovered that this patch will not fix the problem in an views iCal feed. So if you users are using an iCal feed that has repeating dates with additions... you still need to keep working to solve the problem.
Good luck, report back.
Shai
Comment #5
jameswoods commented*blush* ha ha, yes, I was not in the deeper 'date' directory. Thanks for clarifying. Also, thanks so much for the IM-speed reply to this thread!!
I'm discussing with my client now the next steps. We have a workaround in place. They are not thrilled about dev versions. We'll see. I'll let you know what we end up doing and the results.
-James
Comment #6
jameswoods commented@Shai, Client has decided to go with the workaround instead of upgrading to dev and patching.
Hopefully I'll end up using your code when your patch is integrated into the next stable release 8^)
Thanks again, your hard work enabled me to make an informed decision.
-James
Comment #7
Shai commented@jameswoods, you are welcome.
Might you summarize what the work-around is?
Shai
Comment #8
GregoryHeller commentedI originally thought this described a problem I am seeing, but re-reading the quote at the top, I'm not sure. I seem to be having a problem with recurring dates when the recurrence is set to "every" "week" the subsequent dates have their time set to 12am. The description suggests the problem is with additional dates, these are dates outside of the normal recurrence. Does the patch solve both issues? I haven't applied it yet, but am planning on trying, so if no one responds, I'll certainly update this issue with the results.
Comment #9
GregoryHeller commentedTurns out I am having trouble getting this patch to patch from inside the /date module or /date/date module directory. patch command asks me which "File to patch:" am I missing something?
Comment #10
GregoryHeller commentedWondering if anyone has looked at the version of PHP running sites that have this problem vs those that done. I have reason to believe that the problem presents on servers running PHP 5.3.x (5.3.6) but NOT on servers running 5.2.17.
Comment #11
caskraker commentedI upgraded tot the dev version, applied the patch (manually), but no solution. Everything is the same: a week interval causes the time to default to 12:00am. A 7 day interval does it right.
Any clues?
Comment #12
GregoryHeller commentedI've confirmed that in my case, the problem relates to the version of php. I've set my live website to run php5.2.17 and i am not seeing the problem of date recurrences having their time set to 12am. However when php 5.3 is used i do have the bug.
Comment #13
dboulet commentedI’m seeing this problem using PHP 5.2.9: the "additional" date is displayed as being at 12am though the repeating date is set to 3pm.
Comment #14
karens commentedJust as in #1130814: Recurring event shows incorrect time with advanced options (PHP 5.3.6), I'm backporting all the fixes made to the D7 version to D6. That seems to solve this problem. These changes should show up by tomorrow, I can't push them at the moment. As soon as I have a good connection I'll push them and provide a link to the commit.
Comment #15
karens commentedOK, done. Look for it tomorrow unless you are getting it from git.
http://drupalcode.org/project/date.git/commit/cd10e98