Plone 4.2.4 shows incorrect local time/3.5 hours ahead

核能气质少年 提交于 2019-12-11 13:24:20

问题


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.



来源:https://stackoverflow.com/questions/14983923/plone-4-2-4-shows-incorrect-local-time-3-5-hours-ahead

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!