Qustions about timestampz - Mailing list pgsql-hackers

From Pavel Stehule
Subject Qustions about timestampz
Date
Msg-id BAY20-F169093CBBC21DE0945D776F9C00@phx.gbl
Whole thread Raw
List 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 by date:

Previous
From: Palle Girgensohn
Date:
Subject: problem building 7.3 on FreeBSD 6
Next
From: "Sergio A. Kessler"
Date:
Subject: Re: MySQL to PostgreSQL for SugarCRM