close

[Solved] AssertionError: database connection isn’t set to UTC

Hello Guys, How are you all? Hope You all Are Fine. Today I set up my server with PostgreSQL but I am seeing the error message. AssertionError: database connection isn’t set to UTC in Django. So Here I am Explain to you all the possible solutions here.

Without Wasting your time, Lets start This Article to Solve This Error.

How AssertionError: database connection isn’t set to UTC Error Occurs ?

Today I set up my server with PostgreSQL but I am seeing the error message.

raise AssertionError("database connection isn't set to UTC")
AssertionError: database connection isn't set to UTC

Here is my settings.py and I want to use timezone.

TIME_ZONE = 'UTC'

USE_TZ = True

How To Solve AssertionError: database connection isn’t set to UTC Error ?

Question: How To Solve AssertionError: database connection isn’t set to UTC Error ?
Answer: To Solve AssertionError: database connection isn’t set to UTC Error You just need to downgrading psycopg2 to 2.8.6 will solve your error. psycopg’s latest version causing this error

Solution 1

psycopg’s latest version causing this error. So all we need to do is just downgrading psycopg2 to 2.8.6 will solve your error.

Summery

It’s all About this issue. Hope all solution helped you a lot. Comment below Your thoughts and your queries. Also, Comment below which solution worked for you?

Also Read

3 thoughts on “[Solved] AssertionError: database connection isn’t set to UTC”

Leave a Comment