0.12.23 timezone in chat messages

This commit is contained in:
SDE
2024-02-09 18:18:21 +03:00
parent b87df02714
commit a3ba6bc783
2 changed files with 5 additions and 2 deletions

View File

@@ -290,6 +290,9 @@ def get_chat_page_content_html(request, receiver_id=None):
from AuthApp.models import User from AuthApp.models import User
from django.utils import timezone from django.utils import timezone
msg = f'now {timezone.now()}'
print(msg)
msgs = [] msgs = []
try: try:
cur_receiver = User.objects.get(id=receiver_id) cur_receiver = User.objects.get(id=receiver_id)

View File

@@ -1,6 +1,6 @@
{% load static %} {% load static %}
{% load tt_chat %} {% load tt_chat %}
{#{% load tz_detect %}#} {% load tz %}
<div style="width: 100%;"> <div style="width: 100%;">
@@ -36,7 +36,7 @@
{% endif %} {% endif %}
</div> </div>
<div class="data_send_message {% get_msg_side user ticket msg %}"> <div class="data_send_message {% get_msg_side user ticket msg %}">
<span>{% if msg %}{{ msg.modifiedDT }}{% else %}{{ ticket.modifiedDT }}{% endif %}</span> <span>{% if msg %}{{ msg.modifiedDT|localtime }}{% else %}{{ ticket.modifiedDT|localtime }}{% endif %}</span>
</div> </div>
</div> </div>
</div> </div>