diff options
| author | Carlton Gibson <carlton.gibson@noumenal.es> | 2021-08-24 11:21:32 +0200 |
|---|---|---|
| committer | Mariusz Felisiak <felisiak.mariusz@gmail.com> | 2021-08-30 10:12:46 +0200 |
| commit | cbba49971bbbbe3e8c6685e4ce6ab87b1187ae87 (patch) | |
| tree | 6d654c7ca2d4c85b53cf84eaa33ce0e8350ad56a /django/utils | |
| parent | d89f976bddb49fb168334960acc8979c3de991fa (diff) | |
Fixed #32992 -- Restored offset extraction for fixed offset timezones.
Regression in 10d126198434810529e0220b0c6896ed64ca0e88.
Diffstat (limited to 'django/utils')
| -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. |
