Drupal settings: Default time zone -0400 (U.S. EDT), configurable time zones disabled.

Event settings: Event timezone input is "Use sitewide timezone"

When I created a 4pm event, it displayed as 8pm with a timezone of 0. Events created under 4.5 and converted to 4.6 display with the correct times.

Comments

shane’s picture

I have the same exact problem. The timezone is being applied to the event date, event though it's set not to apply it.

I'm using the event-cvs version that the CHANGELOG has a dated April 15th statement saying that timezone handling fixes were applied.

crunchywelch’s picture

Assigned: Unassigned » crunchywelch

Can you tell me what the tz field value for that event in your event table is set to? It should be -14400 for -0400 timezone. And the sitewide timezone is set to -0400?

mikeryan’s picture

The tz field in the event table is 0. In the variables table:

configurable_timezones = 0
date_default_timezone = -14400
sitewide_timezone = 1
event_timezone = 0
event_timezone_display = event
event_timezone_input = site

Thanks.

crunchywelch’s picture

So, when you create a new event, can you check to see if there is a hidden timezone field with your site timezone value (-14400) in it? The hidden field should be after the end time input fields. If it set, once you create the event, can you verify the new node's tz entry in the event table?

According to your settings, the events should be using your sitewide timezone. This should narrow it down to a form creation problem, or a data input problem.

Thanks for the troubleshooting, I have not been able to recreate this problem on either of my sandboxes.

mikeryan’s picture

The hidden field is there and set:

<input type="hidden" name="edit[tz]" value="-14400" />

The tz field in the event table ends up as 0.

Substituting db_queryd for db_query on the INSERT, the query looks like:

INSERT INTO event (nid, start, end, tz) VALUES (4097, 1114383600, 1114383600, -14400)

Note that tz is defined as UNSIGNED in the database....

crunchywelch’s picture

hrm, your tz field should defintely not be unsigned. Are you using mysql or postgres?

mikeryan’s picture

Well, it's what the upgrade script had me do:

print 'ALTER TABLE event ADD tz INT(11) UNSIGNED default NULL;<br />'."\n";

There's the smoking gun...

crunchywelch’s picture

Excellent work. Thanks for the help, I'll commit a fix now.

Anonymous’s picture