Drupal version 6.22
On updating to Date 6x-2.8, events using date on the Calendar module no longer appear if they are on the last day of any month (whether it's the 29th, 30th, or 31st), when nearing midnight. For instance, an event on February 29 at 7pm doesn't appear; but one at 7am does appear.
This is a critical issue, since we need to get the security updates but cannot update our production installation until this is fixed.
Prior to Date 6x-2.8, the calendar was working normally and as expected.
| Comment | File | Size | Author |
|---|---|---|---|
| #10 | Screen shot 2012-02-20 at 4.43.19 PM.png | 38.32 KB | technicalknockout |
| #10 | Screen shot 2012-02-20 at 4.47.21 PM.png | 41.2 KB | technicalknockout |
| #10 | Screen shot 2012-02-20 at 4.47.59 PM.png | 53.26 KB | technicalknockout |
| #8 | events_on_calendar_disappear-1411872-08.patch | 594 bytes | technicalknockout |
Comments
Comment #1
webdrips commentedI too am experiencing this issue. The trigger appears to be the offset from GMT (in my case -8 for PST).
If I set an event's time from 4:00 to 5:00, the event appears in the calendar view for the following month. Since 4 + 8 = 12, it leads me to believe the offset from GMT is causing the issue.
If I set the date of an event back to say 2:00 to 3:00, it appears on the calendar in the proper month.
Using the latest version of calendar/views BTW.
Comment #2
technicalknockout commentedI did a little poking around on my site and database. This is what I found:
- First of I have a calendar event on Feb 29 7:00 pm and my site is at UTC -7:00. The event is not displaying
- looking at 'admin/build/views/edit/calendar' and previewing 2012-02 the query displayed is:
- querying the database manually for my node ...
... I get:
Not sure yet how/where the SQL query is being created just yet, but I hope this helps track down the bug.
Comment #3
technicalknockout commentedIt looks like the views argument is being passed on directly but maybe it should be adjusted for the system timezone?
Comment #4
retorque commentedLines 296 and 297 in date_api_argument_handler.inc did not exist in a previous version of the module that I had running on another site. When I commented out line 297, the event appeared in my calendar.
// Setting the offset to avoid trying to use timezone adjustments for dates that don't need it.
$this->offset = in_array($this->date_handler->granularity, array('hour', 'minute', 'sec')) ? NULL : 0;
I have not yet done any research to find out what commenting out that line might break, but I'm hoping someone else might know and speak up before I dig too deep.
Comment #5
retorque commentedIt looks like line 297 was probably part of a change intended to correct this issue: http://drupal.org/node/745074
I'm not sure I have the necessary knowledge to determine what might break. Since the actual code change is not posted in a patch (the posted patches were not used), I'm not clear on exactly what else might have changed, either.
Comment #6
mrothmay commentedAny development on a tested patch for this bug? Does commenting out line 297 seem to break anything?
Comment #7
webdrips commentedConfirming that commenting out line 297 of date/includes/date_api_argument_handler.inc seems to address the underlying issue.
Will continue to test over the next week or so and see if anything negative happens.
Comment #8
technicalknockout commentedNice, that worked for me also. Just made a patch for review.
I also ran the tests with and without applying the patch. The results included 3 test fails and 15 exceptions, but they were thrown both times I ran the tests, so at least nothing new broke... The failed tests were part of the CCK UI tests, I'll take some screenshots and upload.
Comment #10
technicalknockout commentedJust uploading screenshots of the test results.
Comment #11
technicalknockout commented#8: events_on_calendar_disappear-1411872-08.patch queued for re-testing.
Comment #12
arlinsandbulte commentedPretty sure this is a duplicate of #1408216: Events no longer appearing in calendar.
That issue also provides a patch.
Comment #13
kassissieh commentedThis fixed the calendar view, but http://drupal.org/node/1408216#comment-5557238 fixed both this and other timezone problems with views date filters.