There are a handful of work-arounds I put into date.inc to deal with bugs and limitations of the current official releases of DateAPI and CCK date fields. Once 6.x-2.0-rc6 and 5.x-2.5 are out of Date module, these work-arounds can be removed from the signup code. Oh, and look at that... date 6.x-2.0-rc6 is now out. ;) Yay...

Comments

dww’s picture

Status: Active » Needs review
StatusFileSize
new4.91 KB

Untested, but something like this for D6.

dww’s picture

StatusFileSize
new4.87 KB

Still untested, but here's a backport to DRUPAL-5--2 for after #341980: Create a date 5.x-2.5 release is done.

dww’s picture

date 5.x-2.5 is now out if anyone wants to give this a try...

dww’s picture

Status: Needs review » Postponed

Tested these. I had a typo in here from a bad function name, now fixed.

However, 5.x-2.5 has a critical bug for this stuff: #346804: Fatal error in date_field_get_sql_handler(): module_load_include() is D6-only, so this will have to be postponed until date 5.x-2.6, which will probably be a while.

dww’s picture

Assigned: dww » Unassigned
Status: Postponed » Needs review

Date's up to 5.x-2.7 and 6.x-2.1 now. ;) Anyone care to test these patches with the latest official date releases and report their findings?

Eirik_R’s picture

Status: Needs review » Reviewed & tested by the community
StatusFileSize
new4.99 KB

I applied the patch for d6 with signup6 from cvs and most recent date. Have found no problems yet. Setting RTBC, which thus applies to the d6 patch. By reading the code I assume this could apply to d5 as well.

I do have one objection/question before actual committing, can it be assumed that sites using date will be up to date?

The patch I've attached is the same as the original, I've just updated the line numbers.

ezra-g’s picture

Status: Reviewed & tested by the community » Needs work

Would love to commit this but after applying and running cron I get:

[28-Dec-2010 23:18:43] PHP Fatal error: Call to undefined method date_sql_handler::date_sql_math() in /Users/ezra/Developer/htdocs/dev/contrib/cod4/sites/all/modules/contrib/signup/includes/date.inc on line 318

ezra-g’s picture

Status: Needs work » Needs review
StatusFileSize
new5.28 KB

Here's a re-roll that uses the correct method. Will do some additional testing but plan to commit this tonight since it's straightforward and helps us reduce code before the D7 update of Signup :).

ezra-g’s picture

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

I tested that via cron, with this patch applied, Signup correctly closed an event after it took place and left open another event that had not yet taken place. Committed. Thanks!
http://drupal.org/cvs?commit=471156