Python OverflowerError:mktime参数在应用迁移时超出范围

Python OverflowerError:mktime参数在应用迁移时超出范围,python,django,django-south,Python,Django,Django South,应用迁移时出现以下错误 RuntimeWarning: DateTimeField received a naive datetime (1970-01-01 00:00:00) while time zone support is active Error in migration: webapp:0002_auto__add_field_quote_added_on OverflowError: mktime argument out of range 应用此迁移时发生错误 import

应用迁移时出现以下错误

RuntimeWarning: DateTimeField received a naive datetime (1970-01-01 00:00:00) while time zone support is active

Error in migration: webapp:0002_auto__add_field_quote_added_on
OverflowError: mktime argument out of range
应用此迁移时发生错误

import datetime
from south.db import db
from south.v2 import SchemaMigration
from django.db import models


class Migration(SchemaMigration):

    def forwards(self, orm):
        # Adding field 'Quote.added_on'
        db.add_column('webapp_quote', 'added_on',
                      self.gf('django.db.models.fields.DateTimeField')(auto_now_add=True, default=datetime.datetime(1970, 1, 1, 0, 0), blank=True),
                      keep_default=False)


    def backwards(self, orm):
        # Deleting field 'Quote.added_on'
        db.delete_column('webapp_quote', 'added_on')


    models = {
        'webapp.quote': {
            'Meta': {'object_name': 'Quote'},
            'added_on': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}),
            'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
            'quote_source': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
            'quote_text': ('django.db.models.fields.TextField', [], {})
        }
    }

    complete_apps = ['webapp']
对这个模型

from django.db import models
from django.contrib.auth.models import User


class Quote(models.Model):
    quote_text = models.TextField()
    quote_source = models.CharField(max_length=100)
    added_on = models.DateTimeField(auto_now_add=True)
    added_by = models.ForeignKey(User, default=1)
安装解决了这个问题


South希望有一个时区感知的DateTime,但它得到的只是一个简单的DateTime,因为没有安装pytz。

你能看看从
DateTime字段中删除
auto\u now\u add
是否修复了任何问题吗?如果是这样,那么我建议使用自定义保存方法,而不是
auto\u now\u add