Commit 6a21c46c authored by RJC's avatar RJC

switched to 12 hr time format

parent 50dd921b
...@@ -7,7 +7,7 @@ from django.utils import timezone ...@@ -7,7 +7,7 @@ from django.utils import timezone
# helper function to convert utc datetime object to local time # helper function to convert utc datetime object to local time
def convert_utc_to_local(utctime): def convert_utc_to_local(utctime):
datetime_format = '%d/%m/%Y %H:%M' datetime_format = '%d/%m/%Y %I:%M %p'
utc = utctime.replace(tzinfo=pytz.UTC) utc = utctime.replace(tzinfo=pytz.UTC)
localtz = utc.astimezone(timezone.get_current_timezone()) localtz = utc.astimezone(timezone.get_current_timezone())
return localtz.strftime(datetime_format) return localtz.strftime(datetime_format)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment