I have created a view to display the upcoming events. I just noticed that some of the event start times are 1 hour off from the start times input in the events itself. I say some of the events, because yesterday I created one which is fine and today I created one which is not right. The time zone set is Europe/Amsterdam, which is in fact 1 hour later than GMT. I do not use user configurable time zones.

My PHP version is 5.2.17.

Could anyone help me?

Event view: http://www.covs.nl (block named 'Activiteiten' in the right side bar)
Example of an event displayed properly: http://www.covs.nl/node/377
Example of an event displayed wrongly: http://www.covs.nl/rotterdam/2011-03-30/jaarvergadering

CommentFileSizeAuthor
#3 event_views.patch2.44 KBalbertczyk

Comments

edvanleeuwen’s picture

Category: support » bug
albertczyk’s picture

Assigned: Unassigned » albertczyk

It looks like event_views module doesn't care about the start_in_dst and end_in_dst values when updating unix_event_start and unix_event_end, so it will show the event time off by one hour if it falls out of DST. It won't be hard to fix, but there will be a need for reacalculating all these values, which can be triggered by dropping columns unix_event_start and unix_event_end.

I'm working on it and I'll submit the patch when it's done, so I've taken the freedom of assigning this bug to myself.
Regs,
Alberto

albertczyk’s picture

StatusFileSize
new2.44 KB

In case anyone is interested, I'm sending a quick hack that fixes the issue, but only if your site is located in CET timezone.
The root cause is that the unix... fields are calculated by just converting the local event times with strtotime(), and I guess this is not taking into account the local timezone and DST.
I'll prepare a real fix in some days, but for European (CET) users, this patch may suffice for the time being.

gcaudle’s picture

Any word on a patch for this for other time zones, and is there a work around that can just add 1 hour to the displayed time that I can remove when the time changes again? This is a very handy way to set up upcoming events views for us, but I need the times to display correctly. I know a bit about date handling in php, so I'll give it a shot if nothing is forthcoming, but it would be great to have this problem solved.

gcaudle’s picture

For my site as a temporary work-around, I've used the "Custom" date format option in views 2 to remove the time from my Event Start field on my view so that it now displays (Month, Day, Year). That way, there at least is no false information being displayed before the user opens the full event, where the time is displayed correctly.

The code to put in the custom date format to remove the time is:

F j, Y

Hope that helps someone!

TJGerken’s picture

Status: Active » Needs work
markabur’s picture

I am in Pacific time and the patch in #3 seems to work for me... I don't see anything specific to the CET timezone in the patch. I did find that I have to re-save the nodes that are in DST period before my view would show the correct time.

Patricia_W’s picture

Did someone prepare a real fix? I'm in EST timezone and the time is showing as 2 hours later than reality. I've had to add the time to the text and remove it from the view. It looks correct in preview mode. It is only in the real mode that the problem shows up.

baxpace’s picture

Any chance this is still being looked into? Maybe even a quick hack to adjust your CET timezone patch for EST. I'll take anything at this point.

Thanks in advance.

nicolasg’s picture

I applied this patch as well and its working good.

The patch is is not CET specific as #7 noted.
This should be pushed to the repo.