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 Postgres time shifting problems #6786

Merged
merged 1 commit into from
Feb 23, 2019
Merged

Fix Postgres time shifting problems #6786

merged 1 commit into from
Feb 23, 2019

Conversation

villebro
Copy link
Member

@villebro villebro commented Jan 30, 2019

The time grain functions on postgres have an unnecessary AT TIME ZONE 'UTC' cast which causes the following problems:

  1. Causes timestamps with a non-UTC timezone to be shifted by the UTC offset.
  2. Makes time grained vs non time grained temporal handling inconsistent (no UTC casting when time grain isn't applied).

Fixes #6763 .

@codecov-io
Copy link

Codecov Report

Merging #6786 into master will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@           Coverage Diff           @@
##           master    #6786   +/-   ##
=======================================
  Coverage   56.07%   56.07%           
=======================================
  Files         526      526           
  Lines       23257    23257           
  Branches     2782     2782           
=======================================
  Hits        13042    13042           
  Misses       9806     9806           
  Partials      409      409
Impacted Files Coverage Δ
superset/db_engine_specs.py 54.11% <ø> (ø) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 11a7ad0...631c7c6. Read the comment docs.

@villebro villebro changed the title [WIP] Fix Postgres timestamp and timezone problems Fix Postgres time shifting problems Feb 1, 2019
@villebro
Copy link
Member Author

villebro commented Feb 1, 2019

Ready for review.

@kristw kristw added !deprecated-label:bug Deprecated label - Use #bug instead change:backend Requires changing the backend labels Feb 1, 2019
@villebro
Copy link
Member Author

Any chance to get this merged? I believe this is one of the last known bugs affecting officially supported sqla dbs.

@mistercrunch mistercrunch merged commit e112659 into apache:master Feb 23, 2019
@villebro villebro deleted the postgres_utc branch February 24, 2019 19:15
@mistercrunch mistercrunch added 🏷️ bot A label used by `supersetbot` to keep track of which PR where auto-tagged with release labels 🚢 0.34.0 labels Feb 28, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🏷️ bot A label used by `supersetbot` to keep track of which PR where auto-tagged with release labels change:backend Requires changing the backend !deprecated-label:bug Deprecated label - Use #bug instead 🚢 0.34.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

postgres timestamp when using Include Time in table view
4 participants