April 1

Поиск
Список
Период
Сортировка
От Andrew Bartley
Тема April 1
Дата
Msg-id 008101c1c318$b4e34830$3200a8c0@abartleypc
обсуждение исходный текст
Ответы Re: April 1  (Tom Lane <tgl@sss.pgh.pa.us>)
Re: April 1  ("Raymond O'Donnell" <rod@iol.ie>)
Список pgsql-general
Hi

I'm having trouble calculating a date of April 1 2002. 

Postgres 7.1.3 Linux 2.4.14

select date(date('2002-03-30') + interval('1 day'))

result 2002-03-31


select date(date('2002-03-31') + interval('1 day'))

result 2002-03-31

It seems as though the "+ interval('1 day'))" only adds 23 hours rather than 24.

So adding "interval( '1 day')" to the march 31 returns march 31.

It may have something to do with day light savings.

Can any one suggest a work around?

Is this a bug?

 

Thanks

 Andrew Bartley

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

Предыдущее
От: Bruce Momjian
Дата:
Сообщение: Re: Clues about tables fileformat
Следующее
От: Samik Raychauhduri
Дата:
Сообщение: Conditional Statement