Closed (duplicate)
Project:
Event
Version:
6.x-2.x-dev
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
8 Jul 2008 at 14:27 UTC
Updated:
13 Sep 2008 at 16:45 UTC
I recently updated to the current version of Event. All events created prior to the upgrade still function properly. If an event is created with an end date, the end date gets lost and is reset to January 00, 0000. The end time is also lost. Editing the even to correct and save has no effect.
When any new event is created, it does not show up on the calendar. I have not tried to edit existing events to see if it will affect date/time.
I have my settings to force server time zone and use a 12h clock instead of 24h. Please let me know if you need any further information.
Comments
Comment #1
Forceflow commentedI can confirm this bug on a 3-days fresh Drupal installation. Non-core modules installed: CCK, Views, Advanced Help and Event 6.x-2.x-dev.
Comment #2
CMangrum commentedI just tried testing some options and it appears to only be a problem when you select 12h instead of 24h in the Event Time Zone Handling options. Setting that preference to 24h will allow for the correct entry/editing/deletion of events. That option seems to only affect how beginning and ending dates/times are entered in an event. The display of the event will still show up in 12h if the site date/time options are set that way. This, in my opinion, lessens the severity of the problem. Hopefully it can be corrected anyway in the near future.
Chris
Comment #3
dturover commentedI had a similar problem. When the minutes in either the start date or the end date was 00, it would be read as a single integer '0' and never got converted to a 2-char string. A symptom is that preview would display the time as "12:0" or "1:0" instead of "12:00" or "1:00". This is not fixed by the time it gets to the INSERT line. MySQL does not know how to read a time of "12:0:00" and the database ends up with a value that is either null or all zeroed out.
I have modified the event_explode_date and event_implode_date to be sure that all affected strings are padded out to two characters. I do not know how to submit a patch, so I will post my code here. event_explode_date is at line 2789 and implode is the next function after it.
These revised functions will repair the minutes before it is shown in preview and before it is saved to the database. The place to really fix the problem is where the form submission is read in and the original values created, but I can not find where that is.
Comment #4
dturover commentedIn http://drupal.org/node/278768 which may be related to this, wdrout has a patch which attacks a similar problem through the expand_event() function. Someone who knows how the module works should have a look at his patch before considering my submissions.
http://drupal.org/files/issues/event.module_66.patch
Comment #5
Matt Townsend commentedThis seemed to go away when I set my site's default timezone. (Oops.)
Edit: I also had to set the default time formats to am/pm readouts. It seems totally fixed now.
Comment #6
dturover commentedhttp://drupal.org/node/267018
This has most likely been fixed in the latest release. If you are still having problems, tell us your timezone setting and the details of any test cases where the problem does or does not happen.