-
-
Notifications
You must be signed in to change notification settings - Fork 564
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
10.0 PostgreSql InvalidCastException with DateTime #1762
Comments
Ping @junderhill |
We’ll take a look if we can add default configuration in our extension methods to avoid this problem! |
This is unfortunate as the solution was taken from the
|
I had a similar problem. After upgrading the CMS to the latest version and adding the above workaround, the home page does not work (HTTP ERROR 404). The manager works without a problem. |
I encountered the following error when trying to launch a brand new project with v10.0 and PostgreSql :
InvalidCastException : Cannot write DateTime with Kind=Local to PostgreSQL type 'timestamp with time zone', only UTC is supported.
To resolve it I needed to add the following line of code in the ConfigureServices method :
System.AppContext.SetSwitch("Npgsql.EnableLegacyTimestampBehavior", true);
I don't know if it's a good way to resolve this but at least it work's for now.
Resources I've found about it :
npgsql/efcore.pg#2000
https://www.npgsql.org/efcore/release-notes/6.0.html
Hope it helps.
The text was updated successfully, but these errors were encountered: