Skip to content

Commit

Permalink
Enable legacy timestamps for Npgsql. Fixes #1762
Browse files Browse the repository at this point in the history
  • Loading branch information
tidyui committed Mar 29, 2022
1 parent dadb218 commit a25be57
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions data/Piranha.Data.EF.PostgreSql/PostgreSqlDb.cs
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
*
*/

using System;
using Microsoft.EntityFrameworkCore;

namespace Piranha.Data.EF.PostgreSql
Expand All @@ -21,6 +22,7 @@ public sealed class PostgreSqlDb : Db<PostgreSqlDb>
/// <param name="options">Configuration options</param>
public PostgreSqlDb(DbContextOptions<PostgreSqlDb> options) : base(options)
{
AppContext.SetSwitch("Npgsql.EnableLegacyTimestampBehavior", true);
}
}
}

0 comments on commit a25be57

Please sign in to comment.