FAQ
Hi,

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. I
realize I can set the timezone parameter before making the call, but I'm
concerned that if a user calls it with a timezone that is different than the
timezone parameter the date they get won't match the timezone they
requested.

Is there a way I can specify timezone as a parameter and force the
timestamps in the where and select clauses to use that timezone? (without
having to set the timezone parameter in the session)

Thanks

Jed.

Search Discussions

  • Tom Lane at May 19, 2005 at 9:52 pm

    "Walker, Jed S" <Jed_Walker@cable.comcast.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

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
grouppgsql-novice @
categoriespostgresql
postedMay 19, '05 at 7:30p
activeMay 19, '05 at 9:52p
posts2
users2
websitepostgresql.org
irc#postgresql

2 users in discussion

Walker, Jed S: 1 post Tom Lane: 1 post

People

Translate

site design / logo © 2022 Grokbase