Skip to content

Commit

Permalink
try to fix timezone ufkc
Browse files Browse the repository at this point in the history
  • Loading branch information
mboehn committed Oct 7, 2016
1 parent 2ac8f75 commit 9641caf
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions levels/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
from django.contrib.auth.models import User
from django.db.models.signals import post_save
from django.dispatch import receiver
import datetime
from django.utils import timezone

class Level(models.Model):
name = models.CharField(max_length=64)
Expand Down Expand Up @@ -66,7 +66,7 @@ def update_userprofile_score(sender, instance, signal, created, **kwargs):
if created:
user = instance.user
userprofile = user.userprofile
userprofile.latest_correct_answer = datetime.datetime.now()
userprofile.latest_correct_answer = timezone.now()
userprofile.score += instance.points
userprofile.save()

Expand Down

0 comments on commit 9641caf

Please sign in to comment.