4 ms·
> > However, when you come across timestamp, you can’t possibly know in what time zone the timestamp is just by looking at it. > yes I do, it's in UTC, because
by fphilipe 8y ago
> > However, when you come across timestamp, you can’t possibly know in what time zone the timestamp is just by looking at it.
> yes I do, it's in UTC, because I assume the application is written to correctly handle datetimes.
> > It is merely a wall time. Maybe it’s UTC,
> no, it's UTC.
No, you don't know that if you're looking at the database without knowledge of the app's conventions.
I don't understand your argument about ambiguity and implicit conversions. Yes, if your session or DB is configured to something other than UTC, it will convert the timestamptz values in your output to that time zone's offset, but it'll still include the offset.
Thus, a value "2019-04-01 00:00:00+00" that is output when using timestamptz with UTC (compared to "2019-04-01 00:00:00" when using timestamp), is output as "2019-03-31 19:00:00-05" when using EST. Both values represent the same moment in time, obviously, and are equivalent. Assuming your app and ORM convert everything to UTC, that shouldn't matter at all.