mirror of
https://github.com/django/django.git
synced 2025-09-09 04:00:48 +00:00
Fixed #26177 -- Fixed a PostgreSQL crash with TIME_ZONE=None and USE_TZ=False.
This commit is contained in:
parent
e000ca23d2
commit
97eb3356b2
5 changed files with 12 additions and 3 deletions
|
@ -197,7 +197,7 @@ class DatabaseWrapper(BaseDatabaseWrapper):
|
|||
|
||||
conn_timezone_name = self.connection.get_parameter_status('TimeZone')
|
||||
|
||||
if conn_timezone_name != self.timezone_name:
|
||||
if self.timezone_name and conn_timezone_name != self.timezone_name:
|
||||
cursor = self.connection.cursor()
|
||||
try:
|
||||
cursor.execute(self.ops.set_time_zone_sql(), [self.timezone_name])
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue