Reviving discussion from timestamp schema migration on postgres doesn't include timezone · Issue #21126 · rails/rails · GitHub
Rails 6.2 should use timestampz as the default Postgres field type for datetime and timestamp.
see Don't Do This - PostgreSQL wiki
timestamp without zone
(current default)
2016-06-03 15:06:35
can be converted to whatever timezone as appropriate. e.g. (('2016-06-03 15:06:35'::timestamp AT TIME ZONE 'UTC') AT TIME ZONE 'America/Chicago')
type of casting.
but timestamp with zone
(timestampz) is like
2016-06-03 15:06:35+00
which includes the zone +00
, and is stored as an offset from the epoch as opposed to without any context. I can’t see why this would be at all problematic unless perhaps you’re working with systems which can’t handle that