跟进https://serverfault.com/questions/191331/should-servers-have-their-timezone-set-to-gmt-utc的问题
MySQL时区应该设置为UTC还是应该设置为与服务器或PHP设置相同的时区?(如果不是UTC)
优缺点都有什么?
在我将一些Wordpress内容导入到Mezzanine的blog_blogpost之后,我在使用mysql 5.5的Ubuntu 12.04机器上出现此错误.
ValueError at /admin/blog/blogpost/
Database returned an invalid value in QuerySet.dates(). Are time zone definitions and pytz installed?
Request Method: GET
Request URL: http://127.0.0.1:8000/admin/blog/blogpost/
Django Version: 1.6.1
Exception Type: ValueError
Exception Value:
Database returned an invalid value in QuerySet.dates(). Are time zone definitions and pytz installed?
Exception Location: /home/me/.mezenv/local/lib/python2.7/site-packages/django/db/models/sql/compiler.py in results_iter, line 1107
Python Executable: /home/me/.mezenv/bin/python
Python Version: 2.7.3
Python Path:
[u'/home/me',
'/home/me/sai',
'/home/me/.mezenv/local/lib/python2.7/site-packages/distribute-0.6.24-py2.7.egg',
'/home/me/.mezenv/local/lib/python2.7/site-packages/pip-1.1-py2.7.egg',
'/home/me/.mezenv/lib/python2.7',
'/home/me/.mezenv/lib/python2.7/plat-linux2',
'/home/me/.mezenv/lib/python2.7/lib-tk',
'/home/me/.mezenv/lib/python2.7/lib-old',
'/home/me/.mezenv/lib/python2.7/lib-dynload',
'/usr/lib/python2.7',
'/usr/lib/python2.7/plat-linux2',
'/usr/lib/python2.7/lib-tk',
'/home/me/.mezenv/local/lib/python2.7/site-packages']
Server time: Sat, 25 …Run Code Online (Sandbox Code Playgroud) 是否有一个详尽的MySQL时区列表?
似乎time_zoneMySQL设置中的有效值取决于主机操作系统,但我无法找到可能值的列表.
我需要时间来展示卡尔加里当地时间.