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.

Comments

karens’s picture

Status: Active » Fixed

This should now be fixed.

Status: Fixed » Closed (fixed)

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

Shai’s picture

The same problem exists for the D6 version.

I tried manually applying the commit to D7 from August 19 but it didn't work. Upon submitting I got the 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.

What would be involved in backporting this solution to D6? I see that 143K sites are still using the D6 version.

Thanks much for your amazing efforts on this module,

Shai Gluskin

jerdavis’s picture

Status: Closed (fixed) » Needs review
StatusFileSize
new1.17 KB

This patch should work for the Drupal 6.x-2.x branch.

Shai’s picture

@jerdavis,

What are you patching onto?

The current dev version of Date 6.x-2.x already seems to include your patch.

And it doesn't work.

Shai

Shai’s picture

Status: Needs review » Closed (fixed)

I'm changing this back to "closed, fixed" because this issue was meant for the D7 version.

I have an issue open for the D6 version at: http://drupal.org/node/1300274

I'm still confused by @jerdavis comment because the latest Dev version of date includes that patch but doesn't fix the problem.

Shai

Shai’s picture

Woohoo! Mystery solved.

@jerdavis did indeed have a solution that works. The problem was with his patch, which was reversed... the lines that were "+" needed to be deleted and the lines with "-" needed to be added.

I'll try to find some time to correct the patch and place it in the active queue for this issue.

Shai

Shai’s picture

I've posted the fixed patch for D6 in its queue: http://drupal.org/node/1300274#comment-5095210.

yan’s picture

Status: Closed (fixed) » Active

This still happens in latest 7.x-2.x-dev. Repeat dates always show "00:00".

karens’s picture

Status: Active » Fixed

Unable to reproduce any problem in the latest version of the code. If you are still seeing this be sure you actually have the latest code. If so and the problem persists I need details about how you have configured your date field, what kind of widget, what kind of field, what all the field and widget settings are, and what value you input into the field.

yan’s picture

Status: Fixed » Active

I just updated to the latest version (Date 7.x-2.x-dev (2011-Nov-25)) and the problem stays the same. It happens only with the advanced repeat options, for example when I use repeat every last monday. In that case, when I click on the date reapeats tab, I get a list of all the dates with the first one showing the correct time and all repeats showing "all day". This does not happen if I just use repeat "every months" without the advanced options.

karens’s picture

Status: Active » Postponed (maintainer needs more info)

This issue is about problems using the 'Additions', not advanced repeat options. However I tried the example in #11 with and without additions and everything works fine.

Be sure you have the very latest dev code. If you still see a problem then I need to know what version of PHP you are using and exactly how the field is configured and all the options you chose on the date form.

yan’s picture

Status: Postponed (maintainer needs more info) » Active
StatusFileSize
new7.93 KB
new72.93 KB

Thanks for your answer KArenS. Attached you can find the date repeat settings and the result. It's actually the "advanced" option, not the additions.

PHP version is 5.3.8. I am using the dev code from yesterday (November 25th).

karens’s picture

As noted above, you have posted something that is a different problem than the original issue, which makes it really hard to manage the issue queue. Each issue is about a specific problem, which can be fixed and then closed. And other people that have the same problem can find it to see what's going on with that problem. When you switch in a new issue it can never be closed and it's not about anything in particular, it's just a collection of different issues that might or might not have any relationship to each other.

I can't reproduce your problem using PHP 5.3.5 and we've had reports that some versions of PHP are interpreting things differently, so this may be one of those. Please open a new issue for clarity that is about that specific problem with a title like 'Advanced repeat options have the wrong time using PHP 5.3.8'. I don't have that version available, so if you could do some testing to see exactly which settings produce the wrong results we'll have something we can use to dig into the problem.

I'll leave this open until you do that, then please close this issue since the original issue is fixed.

yan’s picture

Status: Active » Fixed

Sorry KarenS, I think I wasn't aware of the difference between repeat additions and advanced options when I saw this issue the first time. Later I didn't re-read it and thought it was the same problem. I opened a seperate issue:

#1353488: Advanced repeat options have the wrong time using PHP 5.3.6 and higher

Status: Fixed » Closed (fixed)

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

brandy.brown’s picture

Version: 7.x-2.x-dev » 7.x-2.0-rc1
Status: Closed (fixed) » Active

I am using the latest version of calendar and date. I am having the same problem as the original issue.

karens’s picture

Version: 7.x-2.0-rc1 » 7.x-2.x-dev
Status: Active » Postponed (maintainer needs more info)

RC is not the latest version. The dev version is the latest version. Using the dev version I see no problem, additions all have the same time as the original dates.

If you see a problem in the latest dev version I need more information about exactly how the fields are configured (what kind of field, what kind of widget, what timezone settings) and also it might help to know what version of PHP you are using.

brandy.brown’s picture

I will go back and try the dev version. RC1 is the latest stable release. This is still a bug that should be patched.

karens’s picture

Status: Postponed (maintainer needs more info) » Fixed

Dev is where patches go. Stable releases are not altered once they are tagged. The patch is in the dev version and will be in the next stable release.

brandy.brown’s picture

Status: Fixed » Active

? I still have this problem with the dev version.

The widget is pop-up calendar the field is of type date the time zone handling is "site's timezone"

karens’s picture

Status: Active » Postponed (maintainer needs more info)

I cannot replicate any problem in the latest code. You will have to provide complete steps to reproduce -- exactly how you set up the field, what date you entered as the start date, what options you chose in the repeating values. And also what timezone your site is using and what version of PHP.

brandy.brown’s picture

Well unfortunately I am unable to add or edit any nodes with a repeating date option right now so I can't provide any more detailed information. I will come back when http://drupal.org/node/1418858 is fixed.

brandy.brown’s picture

Status: Postponed (maintainer needs more info) » Closed (cannot reproduce)

I went ahead and closed this since I found out that I am running Drupal 7.2!! I am sure an upgrade will solve my issues.

brandy.brown’s picture

Status: Closed (cannot reproduce) » Active

OK I have updated to Drupal 7.12 and am using the current DEV version of date. I am still having the trouble that the times are not correct on the calendar view ... when I pull the field into a view in a block, the time given is correct. I am also running the latest dev version of calendar.

I am using PHP 5.3.6

brandy.brown’s picture

Status: Active » Closed (fixed)

OK I got it working ... the module didn't update correctly the first time around. Thanks for all your help!