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

[PostgreSQL] Add support for AT TIME ZONE #32340

Closed
fabio-stein opened this issue Nov 18, 2023 · 2 comments
Closed

[PostgreSQL] Add support for AT TIME ZONE #32340

fabio-stein opened this issue Nov 18, 2023 · 2 comments

Comments

@fabio-stein
Copy link

I have a table with data stored in UTC timestamptz, I want to select and group by date using a specific timezone on each execution.
As far as I did read, using the operation "AT TIME ZONE" in Postgres seems to be the most ideal solution.
I see that for SQL Server, EF already have the function implemented in #26199

Can we have EF.Functions.AtTimeZone used in PostgreSQL?

@roji
Copy link
Member

roji commented Nov 18, 2023

Have you tried using TimeZoneInfo.ConvertTimeBySystemTimeZoneId() as listed in the docs? Did you run into any issues?

@roji
Copy link
Member

roji commented Nov 18, 2023

Note also that this is the EF repo - Npgsql-specific issues belong in https://github.com/npgsql/efcore.pg. Am going to close this as external, but if you can't make it work with ConvertTimeBySystemTimeZoneId() please open an issue over there with a minimal, runnable repro.

@roji roji closed this as not planned Won't fix, can't repro, duplicate, stale Nov 18, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants