|
@@ -22,6 +22,7 @@ from rest_framework import status
|
|
|
from rest_framework.views import APIView
|
|
from rest_framework.views import APIView
|
|
|
from django.utils import timezone
|
|
from django.utils import timezone
|
|
|
import logging
|
|
import logging
|
|
|
|
|
+from zoneinfo import ZoneInfo
|
|
|
logger = logging.getLogger(__name__)
|
|
logger = logging.getLogger(__name__)
|
|
|
|
|
|
|
|
# To login
|
|
# To login
|
|
@@ -622,11 +623,12 @@ def get_title_creator_tasks_json(request):
|
|
|
'filename': t.original_filename or "Unknown File",
|
|
'filename': t.original_filename or "Unknown File",
|
|
|
'status': t.status,
|
|
'status': t.status,
|
|
|
'url': t.download_url,
|
|
'url': t.download_url,
|
|
|
- 'date': t.created_at.strftime("%d %b %Y, %I:%M %p"),
|
|
|
|
|
|
|
+ 'date': t.created_at.astimezone(ZoneInfo("Asia/Kolkata")).strftime("%d %b %Y, %I:%M %p"),
|
|
|
# Use a conditional (ternary) operator to handle the null case
|
|
# Use a conditional (ternary) operator to handle the null case
|
|
|
- 'completed_at': t.completed_at.strftime("%d %b %Y, %I:%M %p") if t.completed_at else ""
|
|
|
|
|
|
|
+ 'completed_at': t.completed_at.astimezone(ZoneInfo("Asia/Kolkata")).strftime("%d %b %Y, %I:%M %p") if t.completed_at else ""
|
|
|
# 'completed_at': t.completed_at.strftime("%d %b %Y, %I:%M %p")
|
|
# 'completed_at': t.completed_at.strftime("%d %b %Y, %I:%M %p")
|
|
|
})
|
|
})
|
|
|
|
|
+ print("data",data)
|
|
|
return JsonResponse(data, safe=False)
|
|
return JsonResponse(data, safe=False)
|
|
|
|
|
|
|
|
|
|
|