I have not had the time to diagnose exactly what's going wrong, but with the HEAD version of event.module and both the HEAD and last version of jstools, dates are mangled somewhere in the form submission process.

Specifically, I can select a date with JSCalendar, and the resulting date in the form input (in %Y-%m-%d %H-%M-%S format) is correct. On submission, though, a time like 18:30 will just end up as 06:30 in the database. I suspect the problem is in the chunk of JSCalendar-specific code around line 1532, but I haven't debugged it yet.

Comments

P00595’s picture

It appears to work properly if the line:

$node->{$prefix . 'hour'} = variable_get('event_ampm', '0') ? date('g', $timestamp) : date('H', $timestamp);

is changed to:

$node->{$prefix . 'hour'} = variable_get('event_ampm', '0') ? date('H', $timestamp) : date('g', $timestamp);
HorsePunchKid’s picture

Status: Active » Needs review

I can confirm that that's fixed it for me, too. Thank you very much, good sir. In patch format:

--- event.module        2007-02-16 14:42:13.000000000 -0800
+++ event.module        2007-02-16 14:37:18.000000000 -0800
@@ -1539 +1539 @@
-    $node->{$prefix . 'hour'} = variable_get('event_ampm', '0') ? date('g', $timestamp) : date('H', $timestamp);
+    $node->{$prefix . 'hour'} = variable_get('event_ampm', '0') ? date('H', $timestamp) : date('g', $timestamp);
killes@www.drop.org’s picture

Status: Needs review » Fixed

Applied, please attach patches next time.

tormi’s picture

Status: Fixed » Needs work

Killes, applied solution reopened another already fixed issue (http://drupal.org/node/71055)..

Tormi

killes@www.drop.org’s picture

Thanks, reverted this patch.

Guess we need to distinguish between ampm and normal mode.

HorsePunchKid’s picture

Status: Needs work » Closed (fixed)

I have just tested this on the CVS head, along with a Postgres support patch, and I wasn't able to reproduce the problem.