Qustions about timestampz

Поиск
Список
Период
Сортировка
От Pavel Stehule
Тема Qustions about timestampz
Дата
Msg-id BAY20-F169093CBBC21DE0945D776F9C00@phx.gbl
обсуждение исходный текст
Список pgsql-hackers
Hello

I am working on trunc and round function now. I have some problems with 
timestemp with time zone datatype. First question?

is correct  behaviour (I am in GMT+2 time zone)?

select current_timestamp, date_trunc('year', current_timestamp), 
date_trunc('month', current_timestamp);

timestamptz|date_trunc|date_trunc
"2005-07-31 10:46:39.087+02"|"2005-01-01 00:00:00+01"|"2005-07-01 
00:00:00+02"

I expected for all values time zone + 2.

Next questions. Is correct idea?

trunc(timestamptz '20010101 10:10:10+8', 'IYYY') --> 20010102 00:00:00+8 ??

or 20010101 18:00:00+02 (24-6) or 20010101 19:00:00+01 or ???

There are somewhere some rules about behavior timestamp with time zone?

Thenk You
Pavel Stehule

_________________________________________________________________
Citite se osamele? Poznejte nekoho vyjmecneho diky Match.com. 
http://www.msn.cz/



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

Предыдущее
От: Palle Girgensohn
Дата:
Сообщение: problem building 7.3 on FreeBSD 6
Следующее
От: "Sergio A. Kessler"
Дата:
Сообщение: Re: MySQL to PostgreSQL for SugarCRM