开发者

Events collection dates are off on collection view

I have a Plone site that was recently updated from Plone 3.1 to Plone 4.

We had an events folder that had a default view that showed a collection of events. In that view, the start and end times are displayed.

Whenever I make a new event content type object and specify the times, the times are off by 8 hours early on the collection table, but correctly shows when I'm viewing the Event created.

Is there some setting that I have to set for the collection time to show properly?

开发者_运维技巧

I was looking into some older information searched about time zones, but it doesn't seem to have any effect when I run the buildout with this setting:

zope-conf-additional =
<environment>
      TZ America/New_York
</environment>

Am I missing anything else? All the migrated content appear to show the correct times in the collection table.


The collection display takes the dates from the catalog metadata as strings and interprets those as DateTime instances. The event edit form works with the actual DateTime instances. Clearly something goes wrong with the catalog storage of the start and end dates, and/or with the display.

You could check the timezone on your indexed events. Go to the ZMI, find the portal_catalog object, and navigate to it's Catalog tab. Find any ATEvent there (you can use the path filter to narrow down results), and click on it's hyperlinked path. It'll open a new window with the catalog information for that specific object. The top table holds the catalog metadata on that object, and collections will use the start and end fields to render event info. Note that these should include timezone info; in my test setup I see date-time strings like 2011/07/05 22:45:00 GMT+2.

If these dates look off to you (missing or incorrect timezone), do a full reindex of your site. Use the Advanced tab of the portal_catalog object, there is a Update Catalog button there. I'd set the Log progress of reindexing value to 1000 objects or so so you get to see the progress in the Zope event log.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜