擅长:python、mysql、java
<p>如<a href="https://docs.djangoproject.com/en/1.10/ref/models/fields/#datefield" rel="nofollow noreferrer">Django docs</a>中所述,auto_now_add使用默认时区填充。如前所述,<a href="https://docs.djangoproject.com/en/1.10/topics/i18n/timezones/#default-time-zone-and-current-time-zone" rel="nofollow noreferrer">here</a>这是根据<code>TIME_ZONE</code>设置填充的。在</p>
<p>因此,我认为你的问题的答案是:</p>
<p><code>TIME_ZONE=Asia/Kolkota</code></p>
<p><code>creation_date = models.DateTimeField(auto_add_now=True)</code></p>