Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: Ensure that PostgreSQL database uses 'UTC' timezone #1098

Merged
merged 1 commit into from
Oct 16, 2023

Conversation

MoritzWeber0
Copy link
Member

The application stores the datatime objects in a timezone naive format. Therefore, we store them as UTC and also expect to get UTC as response.

We expect the database to run in UTC, it should not perform any additional datetime or timezone transformation. The transformation is done in the application.

However, some databases run in different timezones. In this case, we ensure that UTC is used for our transactions.

The application stores the datatime objects in a timezone naive format.
Therefore, we store them as UTC and also expect to get UTC as response.

We expect the database to run in UTC, it should not perform any additional
datetime or timezone transformation. The transformation is done in the
application.

However, some databases run in different timezones. In this case, we
ensure that UTC is used for our transactions.
@MoritzWeber0 MoritzWeber0 changed the title feat: Ensure that PostgreSQL database uses 'UTC' timezone fix: Ensure that PostgreSQL database uses 'UTC' timezone Oct 16, 2023
@codecov
Copy link

codecov bot commented Oct 16, 2023

Codecov Report

All modified lines are covered by tests ✅

Comparison is base (aa83811) 71.61% compared to head (e9d39df) 71.61%.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #1098   +/-   ##
=======================================
  Coverage   71.61%   71.61%           
=======================================
  Files         160      160           
  Lines        5073     5073           
  Branches      543      543           
=======================================
  Hits         3633     3633           
  Misses       1336     1336           
  Partials      104      104           
Files Coverage Δ
backend/capellacollab/core/database/__init__.py 70.83% <ø> (ø)

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@MoritzWeber0 MoritzWeber0 merged commit ac59141 into main Oct 16, 2023
23 checks passed
@MoritzWeber0 MoritzWeber0 deleted the ensure-utc-in-db branch October 16, 2023 12:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants