#33279: time zone with dash in name not recognized
-------------------------------------+-------------------------------------
Reporter: yakimka | Owner: nobody
Type: Bug | Status: new
Component: Database | Version: 3.2
layer (models, ORM) |
Severity: Normal | Keywords:
Triage Stage: | Has patch: 0
Unreviewed |
Needs documentation: 0 | Needs tests: 0
Patch needs improvement: 0 | Easy pickings: 0
UI/UX: 0 |
-------------------------------------+-------------------------------------
Maybe I do something wrong, but I ran into a problem:
{{{
In [1]: import zoneinfo
In [2]: import datetime
In [3]: with timezone.override(zoneinfo.ZoneInfo('Asia/Ust-Nera')):
...:
SomeModel.objects.filter(date__date=datetime.datetime.now().date()).only('id').first()
...:
SELECT "some_model"."id"
FROM "some_model"
WHERE ("some_model"."date" AT TIME ZONE 'Asia/Ust+Nera')::date =
'2021-11-10'::date
ORDER BY "some_model"."id" ASC
LIMIT 1
Execution time: 0.003478s [Database: default]
---------------------------------------------------------------------------
InvalidParameterValue Traceback (most recent call
last)
/usr/local/lib/python3.9/site-packages/django/db/backends/utils.py in
_execute(self, sql, params, *ignored_wrapper_args)
83 else:
---> 84 return self.cursor.execute(sql, params)
85
InvalidParameterValue: time zone "Asia/Ust+Nera" not recognized
}}}
Timezone "Asia/Ust-Nera" supported by psql:
{{{
SELECT name FROM pg_timezone_names where name = 'Asia/Ust-Nera';
}}}
Reproduced on Postgresql 11 and 12
--
Ticket URL: <https://code.djangoproject.com/ticket/33279>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.
--
You received this message because you are subscribed to the Google Groups
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/django-updates/050.8a3e2640039513e7aa7cb44009cb2ac6%40djangoproject.com.