pvergain edited a comment on issue #15768:
URL: https://github.com/apache/superset/issues/15768#issuecomment-986933558


   > Work fine after modify postgres db engine, and timezone offset problem in 
explore solved. Steps with docker-compose instance(version=1.3.1).
   > 
   > ```shell
   > docker exec -it superset_app /bin/bash
   > apt-get update
   > apt-get install vim
   > vim /app/superset/db_engine_specs/postgres.py 
   > # delete line 171 (cursor.tzinfo_factory = FixedOffsetTimezone)
   > exit
   > # back to host machine
   > docker-compose -f docker-compose-non-dev.yml restart
   > ```
   > 
   > [psycopg 2.9 release 
note](https://www.psycopg.org/docs/news.html#what-s-new-in-psycopg-2-9) 
psycopg2 updated to use `datetime.timezone` as `tz` property of datetime 
object, we do not need `pytz._FixedOffset` any more.
   
   
   This solution works for me but this solution seems better: 
https://github.com/apache/superset/issues/15768#issuecomment-987887089
   
   
![image](https://user-images.githubusercontent.com/57228/144882866-3f1d753e-bc2b-4e01-a017-5686e799d0e2.png)
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]



---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to