fix date wrangling
This commit is contained in:
+4
-1
@@ -40,6 +40,7 @@ import pydicom
|
||||
import dicognito.anonymizer
|
||||
from django.contrib.auth.models import User
|
||||
from django.forms.models import model_to_dict
|
||||
from django.forms.utils import from_current_timezone, to_current_timezone
|
||||
|
||||
|
||||
def findMiddle(input_list):
|
||||
@@ -881,7 +882,9 @@ class ExamBase(ExamOrCollectionGenericBase):
|
||||
|
||||
def __str__(self):
|
||||
if self.start_date and self.start_date is not None:
|
||||
return f"{self.name} ({self.start_date:%d %B %Y})"
|
||||
print(self.start_date)
|
||||
print(to_current_timezone(self.start_date))
|
||||
return f"{self.name} ({to_current_timezone(self.start_date):%d %B %Y})"
|
||||
else:
|
||||
return self.name
|
||||
|
||||
|
||||
Reference in New Issue
Block a user