Drupal 6, php 5.3.6

Firstly thanks for calendar/date. Tested this with 6.2 latest stable and 6.x-2.x-dev from today.

Setup calendar with instructions from docs area. Turned on date repeat api.

Created repeat event, seems to work fine. Modify advanced repeat rules to use BYDAY field. Now all repeat dates after the first for the event show the time as the correct duration but starting at 00:00.

From playing with lots of combinations it seems that to recreate the problem create a recurring event and set a BYDAY and/or BYMONTH field but do not set the BYMONTHDAY field. I.e. if using advanced options and don't use BYMONTHDAY field then incorrect time is shown as above.

With reference to previous seemingly related bug reports - I have set the drupal default timezone to both London (my timezone) and left it blank.

Attached file shows the event I was creating with date options and the second shows the repeats tab.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

bobbers’s picture

Component: Code » Date Repeat API
bobbers’s picture

Status: Active » Closed (fixed)

I will close this again.

The problem was that php date_modify was dropping the time part of the date being modified.

It turns out that changing from 5.3.6 -> 5.3.5 of php from macports on OS X fixes the problem. I assume there is a bug in 5.3.6 of php provided by macports.

derrie’s picture

Status: Closed (fixed) » Active

Re-opening as I'm seeing the same issue on php 5.3.6 on Amazon Linux so it's probably not isolated to the macports version of PHP

D

meanbeth’s picture

I'm having the same problem. Also on a server with PHP 5.3.6. No problems on my local install with PHP 5.2.6.

Tried both Date 6.x-2.7 and the latest dev. Tried modifying timezone settings.

It cropped up suddenly on a working site where calendar/date have been rolling for several months without a hitch. All new nodes with repeat events show a start time of 00:00 for all events except the first one, which displays correctly.

sketchysteven’s picture

subscribe

Same problem here. And I can confirm that using Bobber's settings in #1 I can get repeat times to work BYDAY. Changing advanced repeats to BYMONTHDAY, puts times at 00:00:00 with correct duration, etc. A peak into my database shows that only under the day settings will the date propagate to my db.

Example output (first line is parent event date):
Wednesday, May 25, 2011 - 03:30 - 05:00
Wednesday, June 29, 2011 - 00:00 - 01:30
Wednesday, July 27, 2011 - 00:00 - 01:30
Wednesday, August 31, 2011 - 00:00 - 01:30
Wednesday, September 28, 2011 - 00:00 - 01:30

I'm am using Advanced repeat Every Month with the following selection box choices: March - December selected, any day, and Last Wednesday.

I'm running PHP 5.3.6 and have tried a whole slew of changes, including creating new content types, new fields with different field types (date, datestamp, datetime), etc.

=====

devel output on the first two data sets gives me the following:

field_date (Array, 38 elements)

0 (Array, 6 elements)
value (String, 19 characters ) 2011-05-25 23:30:00
value2 (String, 19 characters ) 2011-05-26 01:00:00
rrule (String, 102 characters )
RRULE:FREQ=MONTHLY;INTERVAL=1;BYDAY=-1WE;BYMONTH=3,4,5,6,7,8,9,10,11,12;UNTIL=20150103T045959Z;WKST=SU
timezone (String, 16 characters ) America/New_York
timezone_db (String, 3 characters ) UTC
date_type (String, 8 characters ) datetime
1 (Array, 6 elements)
value (String, 19 characters ) 2011-06-29 04:00:00
value2 (String, 19 characters ) 2011-06-29 05:30:00
rrule (String, 102 characters )
RRULE:FREQ=MONTHLY;INTERVAL=1;BYDAY=-1WE;BYMONTH=3,4,5,6,7,8,9,10,11,12;UNTIL=20150103T045959Z;WKST=SU
timezone (String, 16 characters ) America/New_York
timezone_db (String, 3 characters ) UTC
date_type (String, 8 characters ) datetime

=======
When I use BYDay.... I get the following:
=======

field_date (Array, 222 elements)

0 (Array, 6 elements)
value (String, 19 characters ) 2011-05-25 23:30:00
value2 (String, 19 characters ) 2011-05-26 01:00:00
rrule (String, 58 characters )
RRULE:FREQ=DAILY;INTERVAL=1;UNTIL=20120103T045959Z;WKST=SU
timezone (String, 16 characters ) America/New_York
timezone_db (String, 3 characters ) UTC
date_type (String, 8 characters ) datetime
1 (Array, 6 elements)
value (String, 19 characters ) 2011-05-26 23:30:00
value2 (String, 19 characters ) 2011-05-27 01:00:00
rrule (String, 58 characters )
RRULE:FREQ=DAILY;INTERVAL=1;UNTIL=20120103T045959Z;WKST=SU
timezone (String, 16 characters ) America/New_York
timezone_db (String, 3 characters ) UTC
date_type (String, 8 characters ) datetime

mayobutter’s picture

You can fix this by passing the time in to all calls to date_format. For example, this line:

date_modify($current_day, '+1 month');

Becomes:

date_modify($current_day, '+1 month '. date_format($current_day, 'g:ia'));

After doing this for all instances of date_modify in date_repeat_calc.inc suddenly a rule like '2nd wed of every month' started working with the correct time.

meanbeth’s picture

Thanks, Mayobutter, for the suggestion (#6). I couldn't get it to work, though. Wonder what I'm doing wrong. Has it worked for anyone else?

mp165’s picture

i got it working (thanks mayobutter!). i made the change in probably 20 places in that file and then it worked for me. php 5.3.6

escapeit’s picture

Version: 6.x-2.x-dev » 6.x-2.7

Had the exact same issue with php 5.3.6 and vanilla date/calendar install for repeating events. In every scenario the time of the first instance is correct; all former instances the time is 12:00am.

It took 5 minutes of cutting and pasting but #6 fixed the issue. Thanks mayobutter!

cdracars’s picture

placeholder

--edit--

thought I needed this to add the comment number to the patch... still not sure how to do that.

cdracars’s picture

First ever attempt at creating a patch... I may have messed it up good. But here it is.

cdracars’s picture

Reviewed patching instructions and made a cleaner patch. Please ignore the first patch as it is a patch on the entire module (yuck!).

cdracars’s picture

Status: Active » Needs review
kettari’s picture

Had the same issue #1194272: Weekly repeat sets 'From' time to 00:00 (marked it as duplicate).

Tried to apply patch, got errors. Then manually changed all required lines and it fixed the issue. So #6 works for me.

cdracars’s picture

Here is another attempt to patch the suggested changes by mayobutter. Patch applied from within the date_repeat folder worked.

mikeryan’s picture

Version: 6.x-2.7 » 7.x-2.x-dev
Status: Needs review » Needs work
FileSize
8.33 KB

I'm facing this problem with both D6 and D7, PHP 5.3.6. Rerolled without whitespace diffs and with the enabling of the Date Repeat simpletests, so the problem can be demonstrated. Running the tests without the patch gave me 17 (or was it 18?) failures, with the patch it's reduced to 5 failures with tons of exceptions - $current_day was used in all the patched date_modify() calls, but not every function has a $current_day present. I don't have time to fix those up right now, but I figure this pushes the issue forward another increment...

meanbeth’s picture

Thanks for the patch (#15), cdracars! And mayobutter for the original fix (#6). You both really helped me out.

Reinstalled the latest dev version and made your changes to date_repeat_calc.inc and now everything is running smoothly again.

* For any other newbies floundering here, it's helpful to open up the patch in a text program or your browser and follow along with the changes. When you're reading a patch, look for pointers like "@@ -134,7 +134,7", which show what line of code you should jump to (in that case, line 134). Then, in the patch, look along the left side for "-" and "+" signs, which show where changes to the code have been made. A "-" means that the text to the right has been removed and a "+" that the following text was added.

Cheers.

jackread’s picture

$current_day was used in all the patched date_modify() calls, but not every function has a $current_day present

@mikeryan - replacing $current_day with $date_in seems to fix it for the occasions where $current_day isn't present.

dollar_dad’s picture

Version: 7.x-2.x-dev » 6.x-2.7

Just to confirm that the patch #15 works on 5.3.6-6~dotdeb.1 with Suhosin-Patch
using Drupal 6.22 and date 6.27.

Not showing any errors in the php log file

Thank a lot to everyone who has solved the problem - saved my bacon :-)

mikeryan’s picture

Title: Recurring event shows incorrect time with advanced options » Recurring event shows incorrect time with advanced options (PHP 5.3.6)
Version: 6.x-2.7 » 7.x-2.x-dev
Status: Needs work » Needs review
FileSize
8.31 KB

General policy is to fix bugs against the latest Drupal version first, then backport.

OK, here's a complete patch for D7 - the tests run clean with this.

KarenS’s picture

Really? Ugh.

It looks like there is no space between the value and the time (i.e. '+1 month00:00:00'). Is that really right, or am I mis-reading this? Also, this needs to be tested in 5.2 and earlier. I have a suspicion this won't work at all in PHP 4, which is OK for D7 but problematic for D6.

I am running 5.2. If no one else gets this tested in 5.2 I'll get back to it later, working on other things right now.

xenyo’s picture

Testing #20 for D7 , cheers.

stinky’s picture

I tried running this patch on Date 6.x-2.x-dev and got errors (see below), am I doing something wrong?

 patch date_repeat.module incorrect-time-1130814-15.patch
patching file date_repeat.module
Hunk #1 FAILED at 33.
Hunk #2 FAILED at 45.
Hunk #3 FAILED at 58.
Hunk #4 FAILED at 74.
Hunk #5 FAILED at 134.
Hunk #6 FAILED at 145.
Hunk #7 FAILED at 170.
Hunk #8 FAILED at 234.
Hunk #9 FAILED at 247.
Hunk #10 FAILED at 267.
Hunk #11 FAILED at 280.
Hunk #12 FAILED at 292.
Hunk #13 FAILED at 309.
Hunk #14 FAILED at 361.
Hunk #15 FAILED at 473.
Hunk #16 FAILED at 484.
Hunk #17 FAILED at 523.
Hunk #18 FAILED at 531.
18 out of 18 hunks FAILED -- saving rejects to file date_repeat.module.rej

stinky’s picture

Manual changes worked! Thanks #6! For those newbies like me, the file you want to edit is date_repeat_calc.inc and it's a sub-directory of the date module.

KarenS’s picture

I was all excited that I now have a computer with 5.3 to test things like this, but it is 5.3.5 where apparently things work fine. So I can't test it.

Probably this, https://bugs.php.net/bug.php?id=54456&edit=1, which says the older behavior was a bug and it was fixed in 5.3.6. This implies I will get different results in 5.3.5 and 5.3.6 :(

I'll poke around with this.

KarenS’s picture

Version: 7.x-2.x-dev » 6.x-2.x-dev
Status: Needs review » Patch (to be ported)

OK, as it turns out, the older versions of PHP 5.3 just ignore it, and they worked before, so the patch won't break them. I also tested in PHP 5.2 and it works right (the same as older versions of PHP 5.3.) I couldn't get the patch to apply so I created it manually and switched it around to use a variable for the time string. That way if we find some versions of PHP need something different in that string it can be changed in one place.

Now we can rework the patch to work in the 6.2 version.

KarenS’s picture

Status: Patch (to be ported) » Needs review

Reopening this. My commit created exception errors in the tests because $modify_date was not defined in date_repeat_set_month_day and date_repeat_set_year_day, but the tests all passed. When I fixed it to define that value the tests failed. I looked at the original code which was using $current_day in those functions, which does not exist there. So I think the original patch also was actually NOT modifying those functions. So I removed the time adjustment in those two functions and all the tests pass in PHP 5.3.5.

Can someone confirm that the tests still pass in PHP 5.3.6?

KarenS’s picture

Version: 6.x-2.x-dev » 7.x-2.x-dev

And back to a 7.2 issue.

KarenS’s picture

Status: Needs review » Fixed

No response, so I'm going to assume it's working in 5.3.6 too.

fossle’s picture

Is there a solution to fix this on D6 yet? I have clients that really need this to work.

KarenS’s picture

Version: 7.x-2.x-dev » 6.x-2.x-dev
Status: Fixed » Patch (to be ported)

Hmm, right. This still needs to be ported.

rwilson0429’s picture

Version: 6.x-2.x-dev » 7.x-2.x-dev
Priority: Normal » Major
Status: Patch (to be ported) » Active

I'm having the same problem, recurring events shows incorrect time. Windows 7 running Apache Server and Drupal 7.7 with PHP 5.3.6. Tried the D7 patch, incorrect-time-1130814-20.patch from #20 but got hunk errors.

Date of Event/Activity:
Repeats every month on the third Sunday until Sun Aug 26 2012 .
Sunday, August 21, 2011 - 10:00 to 12:00
Sunday, September 18, 2011 - 00:00 to 02:00
Sunday, October 16, 2011 - 00:00 to 02:00
Sunday, November 20, 2011 - 00:00 to 02:00
Sunday, December 18, 2011 - 00:00 to 02:00
Sunday, January 15, 2012 - 00:00 to 02:00
Sunday, February 19, 2012 - 00:00 to 02:00
Sunday, March 18, 2012 - 00:00 to 02:00
Sunday, April 15, 2012 - 00:00 to 02:00
Sunday, May 20, 2012 - 00:00 to 02:00
Sunday, June 17, 2012 - 00:00 to 02:00
Sunday, July 15, 2012 - 00:00 to 02:00
Sunday, August 19, 2012 - 00:00 to 02:00

KarenS’s picture

Status: Active » Postponed (maintainer needs more info)

If you tried to patch D7 you may have broken it. D7 is already fixed. You must be using the 7.x-2.x-dev version of Date. Get a clean version of the latest code (the dev version) and try again in D7.

karunadave’s picture

Here is another hopeful d6 user. I understand the policy of fixing the most recent Drupal version first. I also noticed at the time of writing there are more than 4 times more d6 users of this module than d7

d6 users: 71,929
d7 users: 15,948

Due to needing to wait for contributed modules to move to out of alpha and beta to an RC stage my site in question isn't ready to migrate to d7 yet.

I am sorry to say I do not have the confidence to back-port this to d6, my deep respect and appreciation to those who do, and who contribute their time and skills to provide this module.

KarenS’s picture

Version: 7.x-2.x-dev » 6.x-2.x-dev
Status: Postponed (maintainer needs more info) » Patch (to be ported)

Moving the issue status back to what it is supposed to be.

rwilson0429’s picture

Thanks Karen. The D7 patch was removed (it failed anyway). Today, I updated to Date 7.x-2.x-dev (2011-Aug-21) but, still having the repeat by months problem.

Install Profile:
Drupal core 7.7
Calendar 7.x-3.x-dev (2011-Aug-20)
Chaos tool suite (ctools) 7.x-1.x-dev (2011-Aug-06)
Date 7.x-2.x-dev (2011-Aug-21)
Views 7.x-3.x-dev (2011-Aug-21)

I notice that after making these updates, the incorrect repeated times have changed from 0:00 -0200 to 12:00 am to 1:00 am. It shows no time at all (see below) on the node view of the Repeat page display (see below).

Submitted by Reggie on Sun, 08/21/2011 - 16:50
Event Date:
08/21/2011 - 11:00am to 1:00pm
08/28/2011 - 12:00am to 2:00am
09/11/2011 - 12:00am to 2:00am
09/25/2011 - 12:00am to 2:00am
10/02/2011 - 12:00am to 2:00am
10/09/2011 - 12:00am to 2:00am
10/23/2011 - 12:00am to 2:00am
11/06/2011 - 12:00am to 1:00am
11/13/2011 - 12:00am to 2:00am
11/27/2011 - 12:00am to 2:00am
12/04/2011 - 12:00am to 2:00am
12/11/2011 - 12:00am to 2:00am
12/25/2011 - 12:00am to 2:00am

gdbassett’s picture

Subscribing. Same problem with 6.x

yowzer’s picture

I was able to get the bug resolved on my 6.x system by replacing every mention of :
date_modify($date, $step . ' ' . $day)
with:
date_modify($date, $step . ' ' . $day . date_format($current_day, ' g:ia'))

Note the space in front of g:ia. If you don't have the space, you will get an error due to the invalid date segment.

karunadave’s picture

Strangely, I don't find any example of this string to replace in date-6.x-2.7.

Please forgive my ignorance of Drupal PHP yowser; is this intended as a literal in post #38

'date_modify($date, $step . ' ' . $day)'

rwilson0429’s picture

Version: 6.x-2.x-dev » 7.x-2.x-dev
Status: Patch (to be ported) » Active

thanks yowser but, that modification did not work for me. Tried that modification (with space in ' g:ia') and got a bunch of errors probably representing the frequency of repeats:

*Notice: Undefined variable: current_day in date_repeat_set_month_day() (line 510 of C:\public_html\Drupal7\sites\all\modules\date\date_repeat\date_repeat_calc.inc).
*Warning: date_format() expects parameter 1 to be DateTime, null given in date_repeat_set_month_day() (line 510 of C:\public_html\Drupal7\sites\all\modules\date\date_repeat\date_repeat_calc.inc).
*Notice: Undefined variable: current_day in date_repeat_set_month_day() (line 510 of C:\public_html\Drupal7\sites\all\modules\date\date_repeat\date_repeat_calc.inc).
*Warning: date_format() expects parameter 1 to be DateTime, null given in date_repeat_set_month_day() (line 510 of C:\public_html\Drupal7\sites\all\modules\date\date_repeat\date_repeat_calc.inc).
*Notice: Undefined variable: current_day in date_repeat_set_month_day() (line 510 of C:\public_html\Drupal7\sites\all\modules\date\date_repeat\date_repeat_calc.inc).
*Warning: date_format() expects parameter 1 to be DateTime, null given in date_repeat_set_month_day() (line 510 of C:\public_html\Drupal7\sites\all\modules\date\date_repeat\date_repeat_calc.inc).
*Notice: Undefined variable: current_day in date_repeat_set_month_day() (line 510 of C:\public_html\Drupal7\sites\all\modules\date\date_repeat\date_repeat_calc.inc).
*Warning: date_format() expects parameter 1 to be DateTime, null given in date_repeat_set_month_day() (line 510 of C:\public_html\Drupal7\sites\all\modules\date\date_repeat\date_repeat_calc.inc).
*Notice: Undefined variable: current_day in date_repeat_set_month_day() (line 510 of C:\public_html\Drupal7\sites\all\modules\date\date_repeat\date_repeat_calc.inc).
*Warning: date_format() expects parameter 1 to be DateTime, null given in date_repeat_set_month_day() (line 510 of C:\public_html\Drupal7\sites\all\modules\date\date_repeat\date_repeat_calc.inc).
*Notice: Undefined variable: current_day in date_repeat_set_month_day() (line 510 of C:\public_html\Drupal7\sites\all\modules\date\date_repeat\date_repeat_calc.inc).
*Warning: date_format() expects parameter 1 to be DateTime, null given in date_repeat_set_month_day() (line 510 of C:\public_html\Drupal7\sites\all\modules\date\date_repeat\date_repeat_calc.inc).
*Notice: Undefined variable: current_day in date_repeat_set_month_day() (line 510 of C:\public_html\Drupal7\sites\all\modules\date\date_repeat\date_repeat_calc.inc).
*Warning: date_format() expects parameter 1 to be DateTime, null given in date_repeat_set_month_day() (line 510 of C:\public_html\Drupal7\sites\all\modules\date\date_repeat\date_repeat_calc.inc).
*Notice: Undefined variable: current_day in date_repeat_set_month_day() (line 510 of C:\public_html\Drupal7\sites\all\modules\date\date_repeat\date_repeat_calc.inc).
*Warning: date_format() expects parameter 1 to be DateTime, null given in date_repeat_set_month_day() (line 510 of C:\public_html\Drupal7\sites\all\modules\date\date_repeat\date_repeat_calc.inc).
*Notice: Undefined variable: current_day in date_repeat_set_month_day() (line 510 of C:\public_html\Drupal7\sites\all\modules\date\date_repeat\date_repeat_calc.inc).
*Warning: date_format() expects parameter 1 to be DateTime, null given in date_repeat_set_month_day() (line 510 of C:\public_html\Drupal7\sites\all\modules\date\date_repeat\date_repeat_calc.inc).
*Notice: Undefined variable: current_day in date_repeat_set_month_day() (line 510 of C:\public_html\Drupal7\sites\all\modules\date\date_repeat\date_repeat_calc.inc).
*Warning: date_format() expects parameter 1 to be DateTime, null given in date_repeat_set_month_day() (line 510 of C:\public_html\Drupal7\sites\all\modules\date\date_repeat\date_repeat_calc.inc).
*Notice: Undefined variable: current_day in date_repeat_set_month_day() (line 510 of C:\public_html\Drupal7\sites\all\modules\date\date_repeat\date_repeat_calc.inc).
*Warning: date_format() expects parameter 1 to be DateTime, null given in date_repeat_set_month_day() (line 510 of C:\public_html\Drupal7\sites\all\modules\date\date_repeat\date_repeat_calc.inc).
*Notice: Undefined variable: current_day in date_repeat_set_month_day() (line 510 of C:\public_html\Drupal7\sites\all\modules\date\date_repeat\date_repeat_calc.inc).
*Warning: date_format() expects parameter 1 to be DateTime, null given in date_repeat_set_month_day() (line 510 of C:\public_html\Drupal7\sites\all\modules\date\date_repeat\date_repeat_calc.inc).
*Notice: Undefined variable: current_day in date_repeat_set_month_day() (line 510 of C:\public_html\Drupal7\sites\all\modules\date\date_repeat\date_repeat_calc.inc).
*Warning: date_format() expects parameter 1 to be DateTime, null given in date_repeat_set_month_day() (line 510 of C:\public_html\Drupal7\sites\all\modules\date\date_repeat\date_repeat_calc.inc).
*Notice: Undefined variable: current_day in date_repeat_set_month_day() (line 510 of C:\public_html\Drupal7\sites\all\modules\date\date_repeat\date_repeat_calc.inc).
*Warning: date_format() expects parameter 1 to be DateTime, null given in date_repeat_set_month_day() (line 510 of C:\public_html\Drupal7\sites\all\modules\date\date_repeat\date_repeat_calc.inc).
*Notice: Undefined variable: current_day in date_repeat_set_month_day() (line 510 of C:\public_html\Drupal7\sites\all\modules\date\date_repeat\date_repeat_calc.inc).
*Warning: date_format() expects parameter 1 to be DateTime, null given in date_repeat_set_month_day() (line 510 of C:\public_html\Drupal7\sites\all\modules\date\date_repeat\date_repeat_calc.inc).

jennypanighetti’s picture

Same issue as #36, D7, those same dev versions of the modules. I am not using Calendar, though, I'm just outputting a list of events.

Scratch that, the latest date dev seems to work fine with my repeating times... not using Calendar, just printing a list.

WoozyDuck’s picture

Subscribing. Same problem with 6.x

yowzer’s picture

@rwilson0429: What version of Date are you using,? Your error indicates that $current_day isn't defined anywhere which makes me think you are using an older version. Which file did you edit?

@karunadave: Not necessarily. Did you look at date_repeat_calc.inc?

rwilson0429’s picture

Status: Needs review » Active

After updating to the latest versions of Date, and applying the modification (with space in ' g:ia') I'm no longer getting the warning and notices about undefined variables. However, the repeat still is showing incorrectly even after applying the modification to the latest Date 7.x-2.x-dev release. Repeats view for a test event is displayed below.

Repeats every month on the second Thursday until Thu Sep 26 2013 .
Thursday, September 29, 2011 - 08:15 to 09:15
Thursday, October 13, 2011 - 00:00 to 01:00
Thursday, November 10, 2011 - 00:00 to 01:00
Thursday, December 8, 2011 - 00:00 to 01:00
Thursday, January 12, 2012 - 00:00 to 01:00
Thursday, February 9, 2012 - 00:00 to 01:00
Thursday, March 8, 2012 - 00:00 to 01:00
Thursday, April 12, 2012 - 00:00 to 01:00
Thursday, May 10, 2012 - 00:00 to 01:00
Thursday, June 14, 2012 - 00:00 to 01:00
Thursday, July 12, 2012 - 00:00 to 01:00
Thursday, August 9, 2012 - 00:00 to 01:00
Thursday, September 13, 2012 - 00:00 to 01:00

I've been updating to the most current dev versions of Date, Ctools and views as soon as they became available. I'm currently using:
Drupal core 7.8
Date 7.x-2.x-dev released on 9/8/2011
Calendar 7.x-3.x-dev released on 9/17/2011
Ctools 7.x-1.x-dev released on 9/16/2011

UPDATE: The latest dev releases fixed this for me.

jerdavis’s picture

Status: Active » Needs review
FileSize
7.91 KB

Here is a patch against the current 6.x-2.x branch. I haven't tested against php < 5.2.x yet so there may be some work yet to either the format() support for date_php4 or this patch to make sure it works for all.

gdbassett’s picture

Is this against the release branch (6.x-2.7 ) or the Dev branch (6.x-2.x-dev )?

kenwest’s picture

Status: Active » Needs review
FileSize
7.59 KB

@gdbassett,

Attached is the patch from #45 modified for 6.x-2.7 ...

zorax’s picture

Version: 7.x-2.x-dev » 6.x-2.7
Assigned: Unassigned » zorax

Hi,
I use php 5.38 and date 6x-2.7 with drupal 6
apply the patch #47
The errors are removed when I select repeat all the day and all the week, but are stil here when I select repeat month or year AND first friday for example (whatever the day), or second or last..
I 've got :
Repeats tous les 0 mois le premier Lundi jusqu'à Sam Déc 31 2011 .
2011-10-20 15:24
2011-11-07 (Toute la journée)
2011-12-05 (Toute la journée)

PBenz’s picture

zorax - I experienced the same problem while trying to apply patch in post #47. So I backed it out and tried the manual approach as described in post #6, which worked. Just be careful to pass the correct variable into date_format - sometimes it's $current_day, other times it's $date.

I realize this is not the optimal approach, but nevertheless I hope this helps.

shabam’s picture

Version: 6.x-2.7 » 7.x-2.x-dev

Today I updated to all the current 7.x dev versions of Views, Date, Calendar and CTool and this does not seems to be fixed, at least not for me. I'm running Drupal 7.9 and PHP 5.3.8. It is only when advanced options are used to select the first/second/third/etc day of the week. ie, I'm working on my church website. We have a foodbank every third Friday at noon. It is displaying in the calendar as midnight.

Things that happen every week work fine. ie, our service is every Sunday, and that displays in the calendar properly.

KarenS’s picture

Version: 7.x-2.x-dev » 6.x-2.x-dev

PLEASE QUIT MOVING THIS ISSUE BACK AND FORTH BETWEEN D6 AND D7. It has become basically useless. I have no idea what applies to which branch any more. The latest patches are for D6, so moving it back there.

Obviously certain versions of PHP behave slightly differently, enough to break the logic. I don't have every version of PHP available to test, nor time to do that. All I can go by is whatever I can figure out from people trying this with various versions, but with all the switching back and forth I have no clue any more what needs to be done.

zorax’s picture

Hello,
thanks for your help PBenz!!,
I try the #6 method with success.
I use php 5.3.8

ressa’s picture

Using the tip posted by mayobutter in #6 fixed the date problem on a shared hosting nginx server, module version: 6.x-2.7

KarenS’s picture

Status: Needs review » Fixed

I think things will work right if we backport all the 5.3 fixes that went into the D7 version of the code, so I just did that. This also fixes the broken tests on sites using php 5.3.

http://drupalcode.org/project/date.git/commit/d8e3851

Please do not use the patches in this issue but instead get the latest version of the code that has this commit in it. The fix is now in git but will not be in the tarball until tomorrow. If you still see problems with that change you can reopen with more details.

Status: Fixed » Closed (fixed)

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

helgew’s picture

Status: Closed (fixed) » Active
FileSize
33.38 KB

This problem does not seem to be resolved. I am running the latest 6.22 distribution on Centos 6, php 5.3.3. The dates generated by date repeat do not seem to honor the timezone settings for the site (fixed to PST) and the times for the events are off during day light saving time as well.

KarenS’s picture

Status: Active » Postponed (maintainer needs more info)

The report that re-opened this issue is too vague to be remotely useful. If you have a problem you need to provide enough information to reproduce it.

dags’s picture

I'm just going to throw this out there in case in helps anyone else...

I was experiencing this issue with a D6 site using an older 6.x-2.x branch of Date module. Updating to 6.x-2.9 fixed the problem BUT in order to fully resolve the issue, I had to manually update any existing repeating in the database because they had already been saved incorrectly by the older version. This could probably be taken care of by re-saving the dates in an update hook, but I don't have the time to roll a patch.

JKingsnorth’s picture

Issue summary: View changes
Status: Postponed (maintainer needs more info) » Closed (fixed)

Recommend opening a new issue for any problems associated with this, with full instructions about how to recreate the problem. Setting it back to closed - fixed.