#33663: Timezones with hyphens in name fail in Extract() functions.
-----------------------------------------+------------------------
Reporter: spetoolio | Owner: nobody
Type: Uncategorized | Status: new
Component: Uncategorized | Version: 4.0
Severity: Normal | Keywords:
Triage Stage: Unreviewed | Has patch: 0
Needs documentation: 0 | Needs tests: 0
Patch needs improvement: 0 | Easy pickings: 0
UI/UX: 0 |
-----------------------------------------+------------------------
{{{
local_tz = pytz.timezone(""Asia/Ust-Nera")
Model.objects.annotate(
created_at_month=ExtractMonth('created_at', tzinfo=local_tz)
)
}}}
Fails with:
{{{
DataError: time zone "Asia/Ust+Nera" not recognized
}}}
I have confirmed this fails with other timezones with hyphens, such as
"America/Port-au-Prince".
I have also confirmed my postgresql DB supports these timezones:
{{{
SELECT
name,
abbrev,
utc_offset,
is_dst
FROM pg_timezone_names
WHERE name !~ 'posix'
ORDER BY name asc;
}}}
--
Ticket URL: <https://code.djangoproject.com/ticket/33663>
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/0107018069509d48-73175806-54b6-4522-a8fe-f6521dda2f97-000000%40eu-central-1.amazonses.com.