活动收集日期在收集视图中已关闭

发布于 2024-10-29 18:50:56 字数 406 浏览 4 评论 0原文

我有一个 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 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

凉月流沐 2024-11-05 18:51:05

集合显示将目录元数据中的日期作为字符串并将其解释为 DateTime 实例。事件编辑表单适用于实际的 DateTime 实例。显然,开始日期和结束日期的目录存储和/或显示出现了问题。

您可以检查索引事件的时区。转到 ZMI,找到 portal_catalog 对象,然后导航到其 Catalog 选项卡。在那里找到任何 ATEvent(您可以使用路径过滤器来缩小结果范围),然后单击其超链接路径。它将打开一个新窗口,其中包含该特定对象的目录信息。顶部表保存该对象的目录元数据,集合将使用 startend 字段来呈现事件信息。请注意,这些应包括时区信息;在我的测试设置中,我看到日期时间字符串,例如 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'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.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文