问题如题,设置如下:
CELERY_ENABLE_UTC = false
TIME_ZONE = 'Asia/Shanghai'
CELERY_TIMEZONE = TIME_ZONE
$celery inspect conf 内容为:
"TIME_ZONE": "Asia/Shanghai",
"CELERY_TIMEZONE": "Asia/Shanghai",
"CELERY_ENABLE_UTC": "false",
celery 写数据库设置为 MySQL
查看内容:
| id | task_id | status | result | date_done | traceback |
+----+--------------------------------------+---------+--------+---------------------+-----------+
| 1 | 0c7b8d48-054d-44cd-abab-6a6bd7fdb8bb | SUCCESS | ? K . | 2016-01-19 10:43:50 | NULL |
date_done 一栏时间还是 UTC ,不是本地时间,这个到底是哪里没设置好呢?