BLACK FRIDAY
From November 21
to December 02
99Days : 99Hrs : 99Min : 99Sec
SAVE UP TO$3K
Also valid for the
existing customers!
Open Closed

Cannot write DateTime with Kind=Local to PostgreSQL type 'timestamp with time zone' #2480


0
scdev01 created
  • ABP Framework version: v5.1.2
  • UI type: Angular
  • DB provider: EF Core Postgresql
  • Tiered (MVC) or Identity Server Separated (Angular): yes
  • Exception message and stack trace: InvalidCastException: Cannot write DateTime with Kind=Local to PostgreSQL type 'timestamp with time zone', only UTC is supported. Note that it's not possible to mix DateTimes with different Kinds in an array/range. See the Npgsql.EnableLegacyTimestampBehavior AppContext switch to enable legacy behavior.
  • Steps to reproduce the issue:"
  • Generate solution from microservice template v5.1.2
  • Switch Db provider to PostgreSQL
  • Regenerate initial migration
  • Run docker containers (db, rabbitmq, ...)
  • Run DbMigrator

1 Answer(s)
  • 0
    sanghel-payoff created

    I'm also encountering major PGSQL compatibility with DateTime entity props, now that Npgsql has been upgraded to 6+.

    I've asked an "official" response to this issue on this support ticket.