summaryrefslogtreecommitdiff
path: root/yaksh/models.py
diff options
context:
space:
mode:
authormaheshgudi2016-07-07 15:42:38 +0530
committermaheshgudi2016-07-11 16:10:55 +0530
commit7394f857c41865ae32b50c18609362ac5397ec4c (patch)
treedc1162619970181a0e204ad199578cb868fa9217 /yaksh/models.py
parentf1f9818a397a954acf3bce134ea278fafca81a08 (diff)
downloadonline_test-7394f857c41865ae32b50c18609362ac5397ec4c.tar.gz
online_test-7394f857c41865ae32b50c18609362ac5397ec4c.tar.bz2
online_test-7394f857c41865ae32b50c18609362ac5397ec4c.zip
minor timezone related changes in models and test cases
Diffstat (limited to 'yaksh/models.py')
-rw-r--r--yaksh/models.py8
1 files changed, 6 insertions, 2 deletions
diff --git a/yaksh/models.py b/yaksh/models.py
index c48eef1..ddfd5db 100644
--- a/yaksh/models.py
+++ b/yaksh/models.py
@@ -163,7 +163,9 @@ class Profile(models.Model):
department = models.CharField(max_length=64)
position = models.CharField(max_length=64)
timezone = models.CharField(max_length=64,
- choices=[(tz, tz) for tz in pytz.common_timezones])
+ default=pytz.utc.zone,
+ choices=[(tz, tz) for tz in pytz.common_timezones]
+ )
###############################################################################
@@ -340,7 +342,9 @@ class QuizManager(models.Manager):
trial_quiz.duration = 1000
trial_quiz.active = True
trial_quiz.start_date_time = timezone.now()
- trial_quiz.end_date_time = datetime(2199, 1, 1, 0, 0, 0, 0)
+ trial_quiz.end_date_time = datetime(2199, 1, 1, 0, 0, 0, 0,
+ tzinfo=pytz.utc
+ )
trial_quiz.save()
return trial_quiz