mirror of
https://github.com/django/django.git
synced 2025-09-19 00:40:11 +00:00
parent
888c1e9bfe
commit
d1bab24e01
63 changed files with 201 additions and 251 deletions
|
@ -85,9 +85,7 @@ class TimeFormat(Formatter):
|
|||
|
||||
try:
|
||||
if hasattr(self.data, 'tzinfo') and self.data.tzinfo:
|
||||
# Have to use tzinfo.tzname and not datetime.tzname
|
||||
# because datatime.tzname does not expect Unicode
|
||||
return self.data.tzinfo.tzname(self.data) or ""
|
||||
return self.data.tzname() or ''
|
||||
except NotImplementedError:
|
||||
pass
|
||||
return ""
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue