diff --git a/Dockerfile b/Dockerfile index ee1d227..cb74ee3 100644 --- a/Dockerfile +++ b/Dockerfile @@ -21,7 +21,4 @@ FROM base AS final WORKDIR /app COPY --from=publish /app/publish . -RUN ln -sf /usr/share/zoneinfo/Asia/Shanghai /etc/localtime -RUN echo 'Asia/Shanghai' >/etc/timezone - ENTRYPOINT ["dotnet", "2021-backend.dll"] \ No newline at end of file diff --git a/Program.cs b/Program.cs index 0cb0683..584e6c1 100644 --- a/Program.cs +++ b/Program.cs @@ -17,6 +17,7 @@ namespace _2021_backend public static void Main(string[] args) { + AppContext.SetSwitch("Npgsql.EnableLegacyTimestampBehavior", true); var host = CreateHostBuilder(args).Build(); using (var scope = host.Services.CreateScope())