Re: timestamp with time zone, retrieving input offset/timezone

From: Scott Marlowe <scott(dot)marlowe(at)gmail(dot)com>
To: Der Tung <dertung(at)gmx(dot)de>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: timestamp with time zone, retrieving input offset/timezone
Date: 2009-08-04 19:24:33
Message-ID: dcc563d10908041224jf282d0bjf09a3717b2f936ba@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Tue, Aug 4, 2009 at 5:09 AM, Der Tung<dertung(at)gmx(dot)de> wrote:
> Hello there,
>
> We are creating an Application that needs to handle timestamps in different
> timezones in particular:
>
> Input and output in timezone of the User is no problem with
>
> Set Time Zone and At Time Zone
>
> But know I have two Users A and B in different  timezones.
>
> When A saves a timestamp I want B to:
>
> -          Get the timestamp displayed in his timezone
>
> -          Get the timestamp displayed in the timezone a originally saved it
> in
>
>
>
> Does the type “timestamp with time zone” contain the original timezone or at
> least the offset to UTC it was saved in, or does it just save the UTC time?

Just UTC time.
If you want the offset saved, you'll have to do that yourself.

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Bayless Kirtley 2009-08-04 20:17:09 Re: Does derby have an embedded Mode like Derby ?
Previous Message Tom Lane 2009-08-04 18:59:12 Re: CHECK constraint fails when it's not supposed to