diff options
Diffstat (limited to 'django/utils/timezone.py')
| -rw-r--r-- | django/utils/timezone.py | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/django/utils/timezone.py b/django/utils/timezone.py index bb2b6b9594..0f5d012c59 100644 --- a/django/utils/timezone.py +++ b/django/utils/timezone.py @@ -72,8 +72,11 @@ def get_current_timezone_name(): def _get_timezone_name(timezone): - """Return the name of ``timezone``.""" - return str(timezone) + """ + Return the offset for fixed offset timezones, or the name of timezone if + not set. + """ + return timezone.tzname(None) or str(timezone) # Timezone selection functions. |
