活动收集日期在收集视图中已关闭
我有一个 Plone 站点,最近从 Plone 3.1 更新到 Plone 4。
我们有一个事件文件夹,其中有一个显示事件集合的默认视图。在该视图中,显示开始时间和结束时间。
每当我创建新的事件内容类型对象并指定时间时,收集表上的时间会提前 8 小时,但会在我查看创建的事件时正确显示。
我是否需要进行一些设置才能正确显示收集时间?
我正在研究一些有关时区的旧信息,但当我使用此设置运行构建时,它似乎没有任何效果:
zope-conf-additional =
<environment>
TZ America/New_York
</environment>
我是否还遗漏了其他内容?所有迁移的内容似乎都在集合表中显示正确的时间。
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.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
集合显示将目录元数据中的日期作为字符串并将其解释为 DateTime 实例。事件编辑表单适用于实际的 DateTime 实例。显然,开始日期和结束日期的目录存储和/或显示出现了问题。
您可以检查索引事件的时区。转到 ZMI,找到
portal_catalog
对象,然后导航到其Catalog
选项卡。在那里找到任何ATEvent
(您可以使用路径过滤器来缩小结果范围),然后单击其超链接路径。它将打开一个新窗口,其中包含该特定对象的目录信息。顶部表保存该对象的目录元数据,集合将使用start
和end
字段来呈现事件信息。请注意,这些应包括时区信息;在我的测试设置中,我看到日期时间字符串,例如2011/07/05 22:45:00 GMT+2
。如果这些日期不适合您(时区缺失或不正确),请对您的网站进行完整的重新索引。使用
portal_catalog
对象的Advanced
选项卡,那里有一个Update Catalog
按钮。我将重新索引的日志进度
值设置为 1000 个对象左右,以便您可以在 Zope 事件日志中查看进度。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'sCatalog
tab. Find anyATEvent
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 thestart
andend
fields to render event info. Note that these should include timezone info; in my test setup I see date-time strings like2011/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 theportal_catalog
object, there is aUpdate Catalog
button there. I'd set theLog progress of reindexing
value to 1000 objects or so so you get to see the progress in the Zope event log.