Around line 192 in date_views/includes/date_views_argument_handler_simple.inc, the time offset is conditionally set to zero if the granularity isn't hour, minute, or second. In some circumstances this will cause events that cross the day or month boundary in the system timezone (or maybe just UTC), but not in the Drupal timezone, to behave oddly, such as with the Calendar module, documented in #1256898: Calendar Day view incorrectly displays events that start after midnight GMT.
I'm not 100% certain on the conditions for this to occur, but these may contribute to it: using a different timezone in Drupal than the system or PHP timezone (in my case, Drupal is America/Los Angeles and the system/PHP is in UTC), or using the Unix datestamp storage format (I believe this is always stored in UTC?). It only occurs with events that cross the boundary of whatever granularity is set.
As an example, an event that occurs after midnight, November 1st in UTC, but before midnight, October 31st in America/Los Angeles with the month granularity will display oddly (stretched across multiple days, despite being a short event), and only display on the "November" calendar, despite viewing it in America/Los Angeles time.
I've attached a (very) small patch that fixes (or perhaps simply works around) this issue by never setting the offset (or, rather, always setting it to NULL). This could probably be streamlined to remove the entire pre_query() function, but I'm not familiar enough with Date to know if that would cause issues elsewhere or where they might occur.
| Comment | File | Size | Author |
|---|---|---|---|
| date_views-fix-timezone.patch | 632 bytes | Anonymous (not verified) |
Comments
Comment #1
epoitras commentedI have a similar issue, spanning events across multiple days with event times such as 22:59 - 23:59. This seems to display only in the Week and Day views, not the Month view. The path mentioned here did not fix the issue.
Comment #2
karens commentedThis part of the code has been changed since alpha4. I cannot reproduce any problem in the latest code. Please try that version. If it is still a problem there, you can reopen with exact steps to reproduce and change the version in this issue to reflect that it is in the dev version.