Reputation: 11834
I am sending the following datetime timezone aware object to django template
current_time = timezone.now()
In my template i am showing it using
{{ current_time }}
it displays as:
Feb. 10, 2021, 3:25 a.m
I want it to display as
Feb. 10, 2021, 3:25 a.m UTC
I dont see which timezone the time is. So i want to be more clear by adding the timezone.
how can i do this in django template
Upvotes: 1
Views: 308
Reputation: 876
try this
{{ current_time |date:"b d Y f a T" }}
you can see more about date template on here:https://docs.djangoproject.com/en/3.1/ref/templates/builtins/#date
Upvotes: 1