From 3f7113f1d976a9bd668afd8114269e8c594dd842 Mon Sep 17 00:00:00 2001 From: Andrew Godwin Date: Fri, 26 Jul 2013 16:46:48 +0100 Subject: [PATCH] Fix timezone warnings if USE_TZ=True --- django/db/migrations/recorder.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/django/db/migrations/recorder.py b/django/db/migrations/recorder.py index 65e4fbbda7..c66d122068 100644 --- a/django/db/migrations/recorder.py +++ b/django/db/migrations/recorder.py @@ -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"