Skip to content

Commit

Permalink
now defaults to timezone aware now().
Browse files Browse the repository at this point in the history
  • Loading branch information
dhedegaard committed Jul 6, 2015
1 parent 7ced074 commit 34ad328
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions youtube/models.py
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
from __future__ import unicode_literals
import requests
import datetime

import dateutil.parser
from django.db import models
from django.conf import settings
from django.utils import timezone
from isodate import parse_duration

from .utils import calculate_rating
Expand Down Expand Up @@ -231,7 +231,7 @@ def __unicode__(self):

def save(self, *args, **kwargs):
if not self.uploaded:
self.uploaded = datetime.datetime.now()
self.uploaded = timezone.now()

if not self.updated:
self.updated = self.uploaded
Expand Down

0 comments on commit 34ad328

Please sign in to comment.