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

docker-compose 启动 rabbit_mongo_influx 创建设备失败 #585

Closed
iioter opened this issue Jan 25, 2022 · 2 comments
Closed

docker-compose 启动 rabbit_mongo_influx 创建设备失败 #585

iioter opened this issue Jan 25, 2022 · 2 comments

Comments

@iioter
Copy link
Contributor

iioter commented Jan 25, 2022

An error occurred while saving the entity changes. See the inner exception for details.\n ---\u003E System.InvalidCastException: Cannot write DateTime with Kind=Local to PostgreSQL type \u0027timestamp with time zone\u0027, only UTC is supported. Note that it\u0027s not possible to mix DateTimes with different Kinds in an array/range. See the Npgsql.EnableLegacyTimestampBehavior AppContext switch to enable legacy behavior.

我提交过一次pr,源码启动已经解决了这个问题,可能docker镜像的版本没有合并?

        AppContext.SetSwitch("Npgsql.EnableLegacyTimestampBehavior", true);
        AppContext.SetSwitch("Npgsql.DisableDateTimeInfinityConversions", true);
@maikebing
Copy link
Member

镜像 可能不是最新的。 我记得我测过来着。

@maikebing maikebing mentioned this issue Jan 28, 2022
@maikebing
Copy link
Member

升级为最新 ef 6 也解决。

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

No branches or pull requests

2 participants