mirror of https://github.com/django/django.git
Fix timezone warnings if USE_TZ=True
This commit is contained in:
parent
9c6d57ef5a
commit
3f7113f1d9
|
@ -1,6 +1,6 @@
|
|||
import datetime
|
||||
from django.db import models
|
||||
from django.db.models.loading import BaseAppCache
|
||||
from django.utils.timezone import now
|
||||
|
||||
|
||||
class MigrationRecorder(object):
|
||||
|
@ -19,7 +19,7 @@ class MigrationRecorder(object):
|
|||
class Migration(models.Model):
|
||||
app = models.CharField(max_length=255)
|
||||
name = models.CharField(max_length=255)
|
||||
applied = models.DateTimeField(default=datetime.datetime.utcnow)
|
||||
applied = models.DateTimeField(default=now)
|
||||
class Meta:
|
||||
app_cache = BaseAppCache()
|
||||
app_label = "migrations"
|
||||
|
|
Loading…
Reference in New Issue