Re: Extracting date from epoche

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: Extracting date from epoche
Дата
Msg-id 13009.993132307@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: Extracting date from epoche  ("Richard Huxton" <dev@archonet.com>)
Список pgsql-sql
"Richard Huxton" <dev@archonet.com> writes:
> Tom - I thought 'epoch'::timestamp should work too - good reason, or just
> One Of Those Things (tm)?

It works --- it's a symbolic value, though.

regression=# select 'epoch'::timestamp;?column?
----------epoch
(1 row)

regression=# select 'epoch'::timestamp + ('1 day'::interval);       ?column?
------------------------1970-01-01 19:00:00-05
(1 row)

Note the epoch is midnight GMT = 7pm local time here.
        regards, tom lane


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

Предыдущее
От: DI Hasenöhrl
Дата:
Сообщение: Problem by inserting rows in a table via function
Следующее
От: "Richard Huxton"
Дата:
Сообщение: Re: Using the extract() function in plpgsql