DateTime mit Kind=UTC kann nicht in den PostgreSQL-Typ „Zeitstempel
ohne Zeitzone“ geschrieben werden.
Und ich möchte das Legacy-Zeitstempelverhalten aktivieren, wie hier dokumentiert:
https://github.com/npgsql/doc/blob/main ... tetime.md/
Code: Select all
public MyDbContext(DbContextOptions contextOptions) : base(contextOptions)
{
AppContext.SetSwitch("Npgsql.EnableLegacyTimestampBehavior", true);
AppContext.SetSwitch("Npgsql.DisableDateTimeInfinityConversions", true);
}
Was ich falsch mache. Warum funktioniert das Legacy-Verhalten nicht?