summaryrefslogtreecommitdiff
path: root/testapp/exam/models.py
diff options
context:
space:
mode:
authorprathamesh2014-07-15 11:32:30 +0530
committerprathamesh2014-07-15 11:32:30 +0530
commitaebfc02d2d6ff9742eec0416a137ca8264ee57d3 (patch)
treec66abe5caa3c16c124669597fa5b89595eb9104d /testapp/exam/models.py
parentff2d8ef28e2c49be940fd87b8364162efc0c4351 (diff)
downloadonline_test-aebfc02d2d6ff9742eec0416a137ca8264ee57d3.tar.gz
online_test-aebfc02d2d6ff9742eec0416a137ca8264ee57d3.tar.bz2
online_test-aebfc02d2d6ff9742eec0416a137ca8264ee57d3.zip
change made to subtract naive and aware datetimes
Diffstat (limited to 'testapp/exam/models.py')
-rw-r--r--testapp/exam/models.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/testapp/exam/models.py b/testapp/exam/models.py
index 4d82783..196ee73 100644
--- a/testapp/exam/models.py
+++ b/testapp/exam/models.py
@@ -304,7 +304,7 @@ class AnswerPaper(models.Model):
def time_left(self):
"""Return the time remaining for the user in seconds."""
- dt = datetime.datetime.now() - self.start_time
+ dt = datetime.datetime.now() - self.start_time.replace(tzinfo=None)
try:
secs = dt.total_seconds()
except AttributeError: