diff --git a/osinaweb/osichat/__pycache__/models.cpython-310.pyc b/osinaweb/osichat/__pycache__/models.cpython-310.pyc index 17168c84..f394a46c 100644 Binary files a/osinaweb/osichat/__pycache__/models.cpython-310.pyc and b/osinaweb/osichat/__pycache__/models.cpython-310.pyc differ diff --git a/osinaweb/osichat/models.py b/osinaweb/osichat/models.py index c0043a5b..b8e0a152 100644 --- a/osinaweb/osichat/models.py +++ b/osinaweb/osichat/models.py @@ -31,7 +31,7 @@ class Visitor(models.Model): def total_duration(self): total_seconds = 0 for log in self.visitorlog_set.all(): - end_time = log.left_date if log.left_date else datetime.now(timezone.utc) + end_time = log.left_date if log.left_date else timezone.now() total_seconds += (end_time - log.visit_date).total_seconds() duration = timedelta(seconds=total_seconds) diff --git a/osinaweb/osinacore/templates/chat_templates/partials/visitors.html b/osinaweb/osinacore/templates/chat_templates/partials/visitors.html index 03b7cebe..4e82a7be 100644 --- a/osinaweb/osinacore/templates/chat_templates/partials/visitors.html +++ b/osinaweb/osinacore/templates/chat_templates/partials/visitors.html @@ -38,7 +38,7 @@ - +
{{visitor.total_duration}}
{% endfor %}