event_form_date uses $hours = drupal_map_assoc(range(0, 23)); => resulting in 0,1,2,3,4,.. to be inserted in hour #options
'#default_value' => _event_date($hour_format, $timestamp, $offset),
inserts hour as 'H' meaning 2 digits....
on submit no match is found and it is reset to 0
same happens for minutes.....
| Comment | File | Size | Author |
|---|---|---|---|
| #12 | event_24hr_reset_fix.patch | 1.34 KB | adrinux |
| #11 | patch_14.patch | 1.68 KB | bwynants |
| patchfile_0.patch | 3 KB | bwynants |
Comments
Comment #1
andrewfn commentedThis is a really irritating problem. I would really appreciate it if this could be fixed soon! (Running Drupal 5.1)
Comment #2
bwynants commentedwhat about applying the attached patch?
Comment #3
andrewfn commentedI was using 12 hour format and was still getting the problem.
I applied the patch after some modification: the second hunk no longer applies to the current release and the last three lines gave an error: "unexpected end of file"
So I removed hunk 2 and the last three lines of the patch and the patching process completed successfully.
The patched module totally solved my problem.
Comment #4
gerhard killesreiter commentedmoving
Comment #5
killes@www.drop.org commentedI can't reproduce this problem. I can submit patches starting at 6 just fine.
Comment #6
killes@www.drop.org commented"submit events" of course.
I mark this "won't fix".
Comment #7
bwynants commentedcan you also not reproduce this using php 5.2 ? I also use safari as browser...
I could reproduce the problem and so could andrewfn
I was also able to identify the problem by reading the code....
It is not correct to insert 1,2,3, ... as options and then setting the current value at 01 this just won't work.
Have you tried editing an event that was set at 4 AM?
Comment #8
killes@www.drop.org commentedyes, php 5.2, but firefox.
Comment #9
adrinux commentedI've just seen this bug too, on a site just opened, with a start time of 9:30.
The hour counter is reset to zero as soon as you edit an event, so that unless you're careful to reset to the correct time every time you edit an event the start time is reset to 00:30!
To clarify: you can post the correct time quite happily, this bug occurs when you *edit* an event after posting it.
Sever one details:
PHP 4.3.10-20
MySQL 4.1.11
Apache/2.0.54 (Debian GNU/Linux)
Sever two details:
PHP 5.2.0-10
MySQL 5.0.38
Apache/2.2.3 (Debian)
For both servers: Event 5.x-1.x-dev
From my testing it makes no difference which browser you use, Firefox exhibits the same bug as other browsers. And it seems it's not related to PHP/MySQL/Apache version.
It doesn't seem to occur if I use the 12hr time notation for entering events, only with the 24hr version, contrary to what others have said.
To reproduce:
1. Go to admin/settings/event/timezone and set the time notation to 24h.
2. Create an event, setting the start time to say 9:30
3. Submit the event
4. Edit the event - the hour counter resets to 00 giving a start time of 00:30
And now onto patch testing....more later
Comment #10
adrinux commentedThis patch won't apply to the current version of the module:
Hunk #1 succeeded at 1066 (offset 7 lines).
Hunk #2 FAILED at 1076.
Hunk #3 succeeded at 1488 (offset 7 lines).
Hunk #4 succeeded at 1521 with fuzz 2 (offset 7 lines).
patch: **** unexpected end of file in patch
Setting to 'code needs work'.
So this bug remains unresolved, but with the workaround of using the 12hr notation.
Comment #11
bwynants commentednew patch created
Comment #12
adrinux commentedThanks bwynants, but I still got an unexpected end of file when I tried to apply it. So I hand applied the changes and tested.
This does seem to work, I tested both the 12hr and 24hr notations and both now work as expected, not reseting when you edit and event.
I don't have a cvs checkout of event so I did an svk diff against my install and produced a patch, it's attached.
Comment #13
killes@www.drop.org commentedCan you tell me whether you use jscalendar or not? Can you make sure this patch also works if you install /disable it?
Comment #14
adrinux commentedI can tell you right now I haven't used jscalendar, so it works ok without it.
...as to what happens when I install it, I'll try and find time later.
Comment #15
michelleI went to apply this patch manually to the latest event code and found that the changes have already been made. So I tested and it's working fine. Marking this as fixed.
Michelle
Comment #16
(not verified) commented