Python/Django MySQL Datetime handling and timezone
问题 I've got a model called Vote with a field date : date = models.DateTimeField(auto_now_add=True) When I add an element, the date in MySQL is an UTC date but I live in UTC+2 timezone I think I correctly set the timezone in settings.py : TIME_ZONE = 'Europe/Paris' Python use the right timezone : >>> print datetime.datetime.now() 2013-07-03 09:05:04.474000 MySQL too : > SELECT NOW( ) 2013-07-03 09:00:48 I could set the date attribute manualy, it works but I would like to know why auto_now_add