Plone 4.2.4显示不正确的本地时间/提前3.5小时 [英] Plone 4.2.4 shows incorrect local time/3.5 hours ahead

查看:97
本文介绍了Plone 4.2.4显示不正确的本地时间/提前3.5小时的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

全新的plone 4.2.4安装(Linux的统一安装程序)为所有Plone/Zope事件写入了错误的时间.

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

我的时区设置为Asia/Jerusalem,时间设置为本地PC时间".

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

Plone领先3.5个小时(三分半).

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?

系统是OpenSuse 12.2

System is OpenSuse 12.2

推荐答案

Python只能给Zope时区作为三个字母的缩写.对于 IST 的亚洲/耶路撒冷.

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

不幸的是,印度标准时间,比亚洲/耶路撒冷要早3个半小时.

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

解决方案是将TZ环境变量添加到您的Zope构建配置中,从而使时区消除歧义:

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

此处JIST是耶路撒冷IST与其他IST含义的对比,当前时间是-2 UTC,夏季在3月的最后一个星期五2点,移动到-3 UTC,然后在9月的第三个星期日,又是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 4.2.4显示不正确的本地时间/提前3.5小时的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆