GORM Playground Link

https://github.com/go-gorm/playground/pull/790

Description

With the database server configured for UTC as it's timezone, and the connection string configured as UTC as it's timezone, the retrieval of a GO time should have the time.Location set to UTC.

This works for mysql, sqlite. It does not work for postgres.

There is a fix for this issue in pgx, but I can't see how to use it in gorm. See the following two issues for discussions on the underlying cause of the issue.

https://github.com/jackc/pgx/issues/1945 https://github.com/jackc/pgx/issues/2117#issuecomment-2315376310