diff options
author | prathamesh | 2014-07-15 11:32:30 +0530 |
---|---|---|
committer | prathamesh | 2014-07-15 11:32:30 +0530 |
commit | aebfc02d2d6ff9742eec0416a137ca8264ee57d3 (patch) | |
tree | c66abe5caa3c16c124669597fa5b89595eb9104d | |
parent | ff2d8ef28e2c49be940fd87b8364162efc0c4351 (diff) | |
download | online_test-aebfc02d2d6ff9742eec0416a137ca8264ee57d3.tar.gz online_test-aebfc02d2d6ff9742eec0416a137ca8264ee57d3.tar.bz2 online_test-aebfc02d2d6ff9742eec0416a137ca8264ee57d3.zip |
change made to subtract naive and aware datetimes
-rw-r--r-- | testapp/exam/models.py | 2 |
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: |