Skip to content

Commit

Permalink
Merge pull request #1098 from DSD-DBS/ensure-utc-in-db
Browse files Browse the repository at this point in the history
fix: Ensure that PostgreSQL database uses 'UTC' timezone
  • Loading branch information
MoritzWeber0 authored Oct 16, 2023
2 parents aa83811 + e9d39df commit ac59141
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion backend/capellacollab/core/database/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,8 @@
from capellacollab.config import config

engine = sa.create_engine(
config["database"]["url"], connect_args={"connect_timeout": 5}
config["database"]["url"],
connect_args={"connect_timeout": 5, "options": "-c timezone=utc"},
)
SessionLocal = orm.sessionmaker(autocommit=False, autoflush=False, bind=engine)

Expand Down

0 comments on commit ac59141

Please sign in to comment.