-->

Plone 4.2.4 shows incorrect local time/3.5 hours a

2019-08-05 01:35发布

问题:

A fresh plone 4.2.4 install (Unified installer for Linux) writes wrong time for all Plone/Zope events.

My timezone is set to Asia/Jerusalem and the time is set to "local PC time".

Plone is ahead of it for exactly 3.5 (three and half) hours.

How can I fix this, and why this should happen at all?

System is OpenSuse 12.2

回答1:

Python can only give Zope the timezone as a three-letter abbreviation. For Asia/Jerusalem that is IST.

Unfortunately, that same abbreviation is also used for India Standard Time, which is exactly 3 and a half hours ahead of Asia/Jerusalem.

The solution is to add a TZ environment variable to your Zope buildout configuration, that disambiguates the timezone:

[instance]
recipe = plone.recipe.zope2instance
...
environment-vars =
    TZ JIST-2JIDT-3,M3.5.5/2,M9.3.0/2

Here JIST is the Jerusalem IST versus other IST meanings, where current time is -2 UTC, and summertime moves to -3 UTC, on the last Friday in March at 2 o'clock, and moves to wintertime again on the 3rd Sunday in September, again at 2 o'clock.



标签: plone zope