Data collection dates are not displayed in collection view.

I have a Plone site that has recently been upgraded from Plone 3.1 to Plone 4.

We had an event folder that had a default view that displayed a collection of events. This view displays the start and end times.

Whenever I create a new object such as the content of the event and specify the time, the time is turned off 8 hours earlier in the meeting table, but it displays correctly when I view the created event.

Is there some kind of setting that I have to set for the collection time in order to display correctly?

I was looking for some older information that was searched in time zones, but it does not seem to have any effect when I run buildout with this parameter:

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

Have I missed anything else? All migrated content seems to show the correct times in the meeting table.

+4
source share
1 answer

Collection mapping displays dates from catalog metadata as strings and interprets them as DateTime instances. The event editing form works with actual DateTime instances. Obviously, something is wrong with storing the catalog of the start and end dates and / or with the display.

You can check the time zone on your indexed events. Go to ZMI, find the portal_catalog object and go to the Catalog tab. Find ATEvent there (you can use the path filter to narrow the results), and click on the hyperlink. It will open a new window with directory information for this particular object. The upper table stores the metadata for the directory of this object, and the collections will use the start and end fields to display information about the event. Please note that they must include time zone information; in my test setup, I see rows with dates, such as 2011/07/05 22:45:00 GMT+2 .

If these dates look to you (missing or incorrect time zone), make a complete review of your site. Use the Advanced tab of the portal_catalog object, there is an Update Catalog button. I set Log progress of reindexing to 1000 objects or so that you can see the progress in the Zope event log.

+2
source

Source: https://habr.com/ru/post/1346631/


All Articles