Ticket #13774 (new Bug)

Opened 2 years ago

Last modified 2 years ago

time zone mismatch between request and date in catalog

Reported by: micecchi Owned by:
Priority: minor Milestone: 4.x
Component: Unknown Version: 4.2
Keywords: timezone Cc: keul, micecchi

Description

As i wrote in the mailing list ( http://plone.293351.n2.nabble.com/wrong-timezone-in-calendar-search-query-td7568236.html):

i've found a strange behaviour with Event dates (start and end) and search form in Plone 4 (4.2.4 and 4.3).

If i create a new event and set start and end date like "2013/10/14 00:00:00", i see it correctly in the calendar portlet, but when i click on the link for the search form, it doesn't return any results.

With a pdb in plone.app.search, i've found the mistake: in the request i have start and end date with GMT+0 timezone: DateTime('2013/10/14 00:00:00 GMT+0')

but in the content, the dates are saved with my current timezone: DateTime('2013/10/14 00:00:00 GMT+1')

And this is the problem. When the view makes the search in the catalog, it doesn't find any event for 2013/10/14.

I think the problem is that in the request set in the portlet's link, there isn't a timezone value, and Plone generates the DateTime object with a default value (GMT+0). I tried to set my timezone in buildout environment-vars:

environment-vars =

TZ Europe/Rome

but nothing changed.

Change History

comment:1 Changed 2 years ago by keul

  • Cc keul added

comment:2 Changed 2 years ago by micecchi

  • Cc micecchi added
Note: See TracTickets for help on using tickets.