diff --git a/tkupek_elearning/elearning/views.py b/tkupek_elearning/elearning/views.py index 5c11710..0a530de 100644 --- a/tkupek_elearning/elearning/views.py +++ b/tkupek_elearning/elearning/views.py @@ -2,7 +2,7 @@ from __future__ import division from django.core.exceptions import ObjectDoesNotExist from django.http import HttpResponse from django.shortcuts import render_to_response -import datetime +from django.utils import timezone import json from tkupek_elearning.elearning.models import Setting, Question, Option, UserAnswer, User, UserAnswerOptions @@ -132,7 +132,7 @@ def get_user_answer(question, user): def log_last_seen(user): - user.last_seen = datetime.datetime.now() + user.last_seen = timezone.now() user.save() @@ -173,4 +173,4 @@ def statistic(request): return render_to_response('statistic.html', {'settings': settings, 'users': users, 'questions': questions}) else: - return render_to_response('access_denied.html', {'settings': settings}) \ No newline at end of file + return render_to_response('access_denied.html', {'settings': settings}) diff --git a/tkupek_elearning/settings.py b/tkupek_elearning/settings.py index 47c0eb0..3f03bb9 100644 --- a/tkupek_elearning/settings.py +++ b/tkupek_elearning/settings.py @@ -104,7 +104,7 @@ AUTH_PASSWORD_VALIDATORS = [ # https://docs.djangoproject.com/en/1.9/topics/i18n/ LANGUAGE_CODE = 'en-us' -TIME_ZONE = 'UTC' +TIME_ZONE = 'Europe/Berlin' USE_I18N = True