Re: Timezone into/out of function

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: "Walker, Jed S" <Jed_Walker(at)cable(dot)comcast(dot)com>
Cc: "'pgsql-novice(at)postgresql(dot)org'" <pgsql-novice(at)postgresql(dot)org>
Subject: Re: Timezone into/out of function
Date: 2005-05-19 21:52:44
Message-ID: 473.1116539564@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-novice

"Walker, Jed S" <Jed_Walker(at)cable(dot)comcast(dot)com> writes:
> I have two functions that have a timestamp wtz passed to and return
> timestamps wtz in a refcursor. The catch is that I need the timezone on the
> timestamp passed out to match the timezone of the timestamp passed in.

You're misunderstanding how timestamp with time zone works. There isn't
any explicitly stored zone in a timestamptz value --- it's all GMT under
the hood. A zone is only introduced for display.

regards, tom lane

In response to

Browse pgsql-novice by date

  From Date Subject
Next Message Timo Roessner 2005-05-20 20:34:21 datatype conversion on postgresql 7.4.1
Previous Message Tom Lane 2005-05-19 21:48:15 Re: Trigger Function Problem