Re: Thoroughly confused about time zones
От
Rob Richardson
Тема
Re: Thoroughly confused about time zones
Дата
Msg-id
04A6DB42D2BA534FAC77B90562A6A03D01769651@server.rad-con.local
Список
Дерево обсуждения
Re: Thoroughly confused about time zones "Rob Richardson" <Rob.Richardson@rad-con.com>
restore a server backup Malm Paul <paul.malm@saabgroup.com>
Re: restore a server backup Raymond O'Donnell <rod@iol.ie>
Re: restore a server backup Vibhor Kumar <vibhor.kumar@enterprisedb.com>
new databases using a template. Malm Paul <paul.malm@saabgroup.com>
Re: new databases using a template. Guillaume Lelarge <guillaume@lelarge.info>
Re: Thoroughly confused about time zones Scott Ribe <scott_ribe@elevated-dev.com>
I think maybe I’m making things much more difficult than they need to be. I tried this:
select cast (extract(epoch from ('2010-3-14 12:00'::timestamp - '2010-3-13 12:00'::timestamp)) as integer) / 60 / 60
and got 24. The difference between timestamps without time zones is 24 hours, even though the interval spanned a time change.
But when I tried this:
select cast (extract(epoch from ('2010-3-14 12:00'::timestamptz - '2010-3-13 12:00'::timestamptz)) as integer) / 60 / 60
I got 23, showing that even if I did not specify what time zone I’m talking about, I got the correct answer.
RobR
В списке pgsql-general по дате отправления