Testing #86462-128: add backend support for cck date fields with event 5.x-2.* (the end of the DRUPAL-5--2 branch of event.module), I discovered two bugs:

A) Autoclose isn't quite working, even for events that already started. However, I suspect timezone badness, since if I try with an even older event (e.g. 2 days ago), it does autoclose.

B) The reminder emails go out, but the %time token is always replaced with [Untimed]

However, I just tried again without the CCK patch, and both things are broken in the same way with event 5.x-2.*. ;) So, the CCK patch isn't a regression, these things are just broken with event 5.x-2.*. Hence, the new bug report.

Comments

dww’s picture

Status: Active » Needs work
StatusFileSize
new987 bytes

This fixes (B), the [Untimed] in reminder emails. It was due to a similar bug as we saw over at #278739: Incorrect Start Date in Admin List.

Still haven't tried to debug (A), but I need to run to go teach a class, so I thought I'd start with this.

dww’s picture

Title: autoclose and reminder emails not working in event 5.x-2.* » Timezone problems with autoclose in event 5.x-2.*
Status: Needs work » Active

Committed #1 to HEAD. I'd love it if someone who understood how event 5.x-2.* handles timezones could work on the remaining problem in here.

dww’s picture

Assigned: Unassigned » dww
Status: Active » Needs review

Ok, I *think* I got this working now:

- we need to use gmdate() to format now as a UTC time if we're going to compare with event_where_utc().

- changed around the logic of the date comparisons to hopefully be more clear. generally, I find the logic makes the most sense as:

now() > $event_start - $time_in_advance_offset

so I tried to use that format of the comparison as much as possible.

Shockingly, this even applies after #328181-5: Allow both event and CCK date to work simultaneously so you can test either or both patches. ;)

dww’s picture

Whoops, the patch... ;)

dww’s picture

Status: Needs review » Fixed

Works for me, and I'm not finding anyone in IRC who wants to test/review this, so I committed to HEAD. If there's a problem, someone can reopen this or post a new bug.

Anonymous’s picture

Status: Fixed » Closed (fixed)

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