Open Closed

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


User avatar
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)
  • User Avatar
    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.

Made with ❤️ on ABP v9.1.0-preview. Updated on November 01, 2024, 05:35