TIMESTAMP with a timezone offset

Поиск
Список
Период
Сортировка
От Madison Kelly
Тема TIMESTAMP with a timezone offset
Дата
Msg-id 4947FE7E.30000@alteeve.com
обсуждение исходный текст
Ответы Re: TIMESTAMP with a timezone offset
Список pgsql-general
Hi all,

   I've got a database with a column I CAST as a TIMESTAMP. The data in
the database is GMT.

   I want to say in my WHERE clause to offset the value I am giving by X
number of hours and to display the column I've cast as a timestamp
offset by the same X hours.

   I am sure this is possible, and probably fairly simple. :)

Here a simplified query I am using that currently has no TZ data:

'bar' is a timestamp from the system, 'baz' is a string from an external
source CAST as a timestamp.

SELECT
   foo,
   bar,
   CAST (baz AS TIMESTAMP) AS last_state_change
FROM
   history.table
WHERE
   bar >= '2008-12-15 14:01:09' AND foo=153;

Thanks!

Madi

В списке pgsql-general по дате отправления:

Предыдущее
От: "Emanuel Calvo Franco"
Дата:
Сообщение: Re: Trigger/Rules Order of operations
Следующее
От: Raymond O'Donnell
Дата:
Сообщение: Re: TIMESTAMP with a timezone offset