Re: Assigning a timestamp without timezone to a timestamp
От | Tom Lane |
---|---|
Тема | Re: Assigning a timestamp without timezone to a timestamp |
Дата | |
Msg-id | 16546.1161092042@sss.pgh.pa.us обсуждение исходный текст |
Ответ на | Re: Assigning a timestamp without timezone to a timestamp (chrisj <chrisj.wood@sympatico.ca>) |
Ответы |
Re: Assigning a timestamp without timezone to a timestamp
|
Список | pgsql-sql |
chrisj <chrisj.wood@sympatico.ca> writes: > When I first saw your solution I thought it was logically going to do > (notice the parentheses): > select ('2006-07-13 09:20:00'::timestamp) at time zone 'EST5EDT'; > which does not help Well, actually, that's exactly what it does. AT TIME ZONE is an operator that converts timestamp without time zone to timestamp with time zone (or vice versa). I guess you could easily get confused here, but AT is not WITH. > , cast(start_datetime as timestamp(0) without time zone)::timestamp at > time zone B.timezone_ch That's redundant --- you're casting the result of the cast to timestamp (implicitly without time zone), then applying the AT TIME ZONE operator. regards, tom lane
В списке pgsql-sql по дате отправления: