diff --git a/dotnet/src/dotnetcore/GxClasses/GxClasses.csproj b/dotnet/src/dotnetcore/GxClasses/GxClasses.csproj
index 37eb56d95..f716f12ee 100644
--- a/dotnet/src/dotnetcore/GxClasses/GxClasses.csproj
+++ b/dotnet/src/dotnetcore/GxClasses/GxClasses.csproj
@@ -161,7 +161,7 @@
-
+
@@ -170,7 +170,7 @@
-
+
diff --git a/dotnet/src/dotnetframework/GxClasses/Data/GXDataPostgreSQL.cs b/dotnet/src/dotnetframework/GxClasses/Data/GXDataPostgreSQL.cs
index d61eedaf5..f89acc4dd 100644
--- a/dotnet/src/dotnetframework/GxClasses/Data/GXDataPostgreSQL.cs
+++ b/dotnet/src/dotnetframework/GxClasses/Data/GXDataPostgreSQL.cs
@@ -587,6 +587,9 @@ public override string ConcatOp(int pos)
sealed internal class PostgresqlConnectionWrapper : GxAbstractConnectionWrapper
{
static readonly IGXLogger log = GXLoggerFactory.GetLogger();
+#if NETCORE
+ const string INFINITY_CONVERSIONS = "Npgsql.DisableDateTimeInfinityConversions";
+#endif
public PostgresqlConnectionWrapper()
{
_connection = (IDbConnection)ClassLoader.CreateInstance(GxPostgreSql.NpgsqlAssembly, "Npgsql.NpgsqlConnection");
@@ -597,6 +600,9 @@ public PostgresqlConnectionWrapper(String connectionString, GxConnectionCache co
try
{
_connection = (IDbConnection)ClassLoader.CreateInstance(GxPostgreSql.NpgsqlAssembly, "Npgsql.NpgsqlConnection", new object[] { connectionString });
+#if NETCORE
+ AppContext.SetSwitch(INFINITY_CONVERSIONS, true);
+#endif
m_isolationLevel = isolationLevel;
m_connectionCache = connCache;
}