﻿id	summary	reporter	owner	description	type	status	component	version	severity	resolution	keywords	cc	stage	has_patch	needs_docs	needs_tests	needs_better_patch	easy	ui_ux
34202	Strict time zone name condition in PostgreSQL DatabaseWrapper.	Alexander Ebral	nobody	"DatabaseWrapper from https://github.com/django/django/blob/main/django/db/backends/postgresql/base.py
in function ''ensure_timezone'' checks that 
{{{
conn_timezone_name != timezone_name
}}}

in our PostgreSQL config timezone was set to 'Etc/UTC' and in django was 'UTC' (There is NO difference between UTC and Etc/UTC time zones: https://stackoverflow.com/questions/14128574/is-there-a-difference-between-the-utc-and-etc-utc-time-zones)
which led to many unnecessary 

{{{
set time zone 'UTC'
}}}

queries.
Maybe we need to change this condition to some fuzzy form? Something like this?:

{{{
conn_timezone_name not in timezone_name and timezone_name not in conn_timezone_name
}}}

"	Cleanup/optimization	closed	Database layer (models, ORM)	4.1	Normal	wontfix			Unreviewed	0	0	0	0	0	0
