From: | "Pavel Stehule" <pavel(dot)stehule(at)hotmail(dot)com> |
---|---|
To: | pgsql-hackers(at)postgresql(dot)org |
Subject: | Qustions about timestampz |
Date: | 2005-07-31 09:16:22 |
Message-ID: | BAY20-F169093CBBC21DE0945D776F9C00@phx.gbl |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | 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/
From | Date | Subject | |
---|---|---|---|
Next Message | Andreas Pflug | 2005-07-31 09:30:51 | Re: Remote administration functionality |
Previous Message | Dave Page | 2005-07-31 09:11:16 | Re: Remote administration functionality |