Re: epoch from date field

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: epoch from date field
Дата
Msg-id 29957.1025758175@sss.pgh.pa.us
обсуждение исходный текст
Ответ на epoch from date field  (Laurette Cisneros <laurette@nextbus.com>)
Ответы Re: epoch from date field  (Laurette Cisneros <laurette@nextbus.com>)
Список pgsql-general
Laurette Cisneros <laurette@nextbus.com> writes:
> select extract(epoch from date(map_date)) from datemaps;
> For a date: 2002-07-04
> it returns 1025740800
> which apparently translates to today (7/3) at 5pm.  Is this right?
> Shouldn't it return the epoch for midnight on 7/4?

You're in GMT-7 to judge by your Date: header.  That *is* midnight,
GMT.

            regards, tom lane



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

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: I am being interviewed by OReilly
Следующее
От: Justin Clift
Дата:
Сообщение: Another win for PostgreSQL & a good basis for a case study