I updated to the latest version in CVS for jstools and event.
Installed jscalender and it shows up fine.

The strangeness starts when I try to edit existing events. The minutes are wrong. The hour stays the same, but the minutes are changed to 5. (I think 5 is the timezone offset, but that is a guess).
The same problem happens with createing a new event. The minutes are always 5.

Editing is big problem because you can change unrelated text and your time changes for you.

I turned jscalendar off and the minutes work fine. I can duplicate on second site.
all_day_event is off. I do not have any special javascript going on.

CommentFileSizeAuthor
#6 event.patch_1.txt1.47 KBwpd
#2 event.module_37.patch1.42 KBkarens

Comments

wpd’s picture

I looked at this some more. The timestamps are the same from 'view' to 'edit'. In view the drupal function format_date is used and in event_form_alter a different function is used. I will try to dig more tonight, unless someone beats me to it.

karens’s picture

Status: Active » Needs review
StatusFileSize
new1.42 KB

I think I found the problem. Try this patch...

wpd’s picture

I found it. The date format is wrong. The function _event_date use gmdate. The symbol for minutes if 'i' not 'm'.
I will roll at patch later on my devel system. You have to change the date from twice in form_alter.

'#default_value' => _event_date('Y-m-d H:m', $node->event_end ? $node->event_end : _event_user_time()),
to 
'#default_value' => _event_date('Y-m-d H:i', $node->event_end ? $node->event_end : _event_user_time()),
karens’s picture

That's the same change as my patch had, so no need to roll another patch :-)

killes@www.drop.org’s picture

Status: Needs review » Needs work

Doesn't apply

wpd’s picture

Status: Needs work » Needs review
StatusFileSize
new1.47 KB

The other patch would not apply for me either. Maybe this will work better.

dustyketchum’s picture

I just tried the fix in this patch on the latest event.module
// $Id: event.module,v 1.206 2006/05/29 18:31:49 killes Exp $

It fixed the minute problem, but not the am/pm problem...see
http://drupal.org/node/65125
for more details

When I enter 00:00:00 as an event time, it displays the event start time as 12:00pm (should be am).

When I enter 12:00:00 as an event time, it displays the event start time as 12:00pm (which is correct).

When I enter 13:00:00 as an event time, it displays the event start time as 1:00am (should be pm).

It doesn't matter whether I type the values in by hand or use jscalendar to enter the times - same results.

My timezone is -0700 (California). Perhaps it should really be -0800 with DST enabled, but it doesn't appear drupal does DST properly if at all, so this is my workaround for now (read lots of threads with no clear results on a DST solution). Configurable time zones are enabled.

I just changed all my date formats to display am/pm, but didn't help this situation any.

webchick’s picture

Status: Needs review » Reviewed & tested by the community

Patch in #6 looks ready to go.. fixed the problem here. It displays the time in the edit box as 24 hour time which is a little awkward, but that seems to be a JS calendar thing, not related to event module.

I couldn't duplicate what dustyketchum is referring to in #7, but in any case that seems to be a separate issue and shouldn't hold up this patch.

gerhard killesreiter’s picture

applied.

gerhard killesreiter’s picture

Status: Reviewed & tested by the community » Fixed

is now in cvs head, will be merged into 4.7 soon.

dustyketchum’s picture

#7 - the am/pm problem - was fixed with webchick's help on the original thread...

http://drupal.org/node/65125

admin / settings / event "Time Notation Preference" needs to be 12h, not 24h

Anonymous’s picture

Status: Fixed » Closed (fixed)
mcurry’s picture

Just adding this to my issues list since dustyketchum's unrelated issue (http://drupal.org/node/65430#comment-105457) bit me in the arse today.