title: AssertionError: database connection isn't set to UTC
body: <p>I have done server setup multiple times with the same settings but this time, I am seeing the error message. It is not even allowing to migrate the database.</p>
  <pre><code>System check identified no issues (0 silenced).
  Exception in thread django-main-thread:
  Traceback (most recent call last):
    File &quot;/usr/lib/python3.9/threading.py&quot;, line 954, in _bootstrap_inner
      self.run()
    File &quot;/usr/lib/python3.9/threading.py&quot;, line 892, in run
      self._target(*self._args, **self._kwargs)
    File &quot;/home/datanal/datanal-samply/venv/lib/python3.9/site-packages/django/utils/autoreload.py&quot;, line 53, in wrapper
      fn(*args, **kwargs)
    File &quot;/home/datanal/datanal-samply/venv/lib/python3.9/site-packages/django/core/management/commands/runserver.py&quot;, line 120, in inner_run
      self.check_migrations()
    File &quot;/home/datanal/datanal-samply/venv/lib/python3.9/site-packages/django/core/management/base.py&quot;, line 458, in check_migrations
      executor = MigrationExecutor(connections[DEFAULT_DB_ALIAS])
    File &quot;/home/datanal/datanal-samply/venv/lib/python3.9/site-packages/django/db/migrations/executor.py&quot;, line 18, in __init__
      self.loader = MigrationLoader(self.connection)
    File &quot;/home/datanal/datanal-samply/venv/lib/python3.9/site-packages/django/db/migrations/loader.py&quot;, line 49, in __init__
      self.build_graph()
    File &quot;/home/datanal/datanal-samply/venv/lib/python3.9/site-packages/django/db/migrations/loader.py&quot;, line 212, in build_graph
      self.applied_migrations = recorder.applied_migrations()
    File &quot;/home/datanal/datanal-samply/venv/lib/python3.9/site-packages/django/db/migrations/recorder.py&quot;, line 77, in applied_migrations
      return {(migration.app, migration.name): migration for migration in self.migration_qs}
    File &quot;/home/datanal/datanal-samply/venv/lib/python3.9/site-packages/django/db/models/query.py&quot;, line 276, in __iter__
      self._fetch_all()
    File &quot;/home/datanal/datanal-samply/venv/lib/python3.9/site-packages/django/db/models/query.py&quot;, line 1261, in _fetch_all
      self._result_cache = list(self._iterable_class(self))
    File &quot;/home/datanal/datanal-samply/venv/lib/python3.9/site-packages/django/db/models/query.py&quot;, line 57, in __iter__
      results = compiler.execute_sql(chunked_fetch=self.chunked_fetch, chunk_size=self.chunk_size)
    File &quot;/home/datanal/datanal-samply/venv/lib/python3.9/site-packages/django/db/models/sql/compiler.py&quot;, line 1170, in execute_sql
      return list(result)
    File &quot;/home/datanal/datanal-samply/venv/lib/python3.9/site-packages/django/db/models/sql/compiler.py&quot;, line 1569, in cursor_iter
      for rows in iter((lambda: cursor.fetchmany(itersize)), sentinel):
    File &quot;/home/datanal/datanal-samply/venv/lib/python3.9/site-packages/django/db/models/sql/compiler.py&quot;, line 1569, in &lt;lambda&gt;
      for rows in iter((lambda: cursor.fetchmany(itersize)), sentinel):
    File &quot;/home/datanal/datanal-samply/venv/lib/python3.9/site-packages/django/db/utils.py&quot;, line 97, in inner
      return func(*args, **kwargs)
    File &quot;/home/datanal/datanal-samply/venv/lib/python3.9/site-packages/django/db/backends/postgresql/utils.py&quot;, line 6, in utc_tzinfo_factory
      raise AssertionError(&quot;database connection isn't set to UTC&quot;)
  AssertionError: database connection isn't set to UTC
  </code></pre>
  <p>Here is my settings.py for timezone.</p>
  <pre><code>LANGUAGE_CODE = 'en-us'
  
  TIME_ZONE = 'UTC'
  
  USE_I18N = True
  
  USE_L10N = True
  
  USE_TZ = True
  </code></pre>
  <p>OS: Ubuntu 21.04
  Python Version : 3.9.5
  Django Version: 3.0
  PostgreSQL: 13.3</p>
  <p>I have also gone through <a href="https://stackoverflow.com/questions/38807296/django-1-9-2-assertionerror-database-connection-isnt-set-to-utc">another question</a> but did not find any solution. Is there anyone who can help me to get this done? I have multiple server setup with same code without changing anything and worked but this time it is not.</p>