Re: timestamp <-> ctime conversion question...

From: Karsten Hilbert <Karsten(dot)Hilbert(at)gmx(dot)net>
To: pgsql-general(at)postgresql(dot)org
Subject: Re: timestamp <-> ctime conversion question...
Date: 2005-12-13 19:21:20
Message-ID: 20051213192119.GM5531@merkur.hilbert.loc
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Tue, Dec 13, 2005 at 10:28:42AM -0700, Michael Fuhr wrote:

> According to the Date/Time Types documentation,
>
> All timezone-aware dates and times are stored internally in UTC.
> They are converted to local time in the zone specified by the
> timezone configuration parameter before being displayed to the
> client.
>
> As far as I know there isn't a way to defeat this. However, the
> developers' TODO file does have the following item:
>
> Allow TIMESTAMP WITH TIME ZONE to store the original timezone
> information, either zone name or offset from UTC
>
> Presumably this would allow timestamps to be displayed with a
> timezone other than the current setting.
*Display* of timestamptz values at arbitrary time zones is
already possible using the "at time zone" syntax. Retrieving
the "original" (as in "as inserted"), however, isn't
possible to date. It would certainly be very useful. In
GNUmed we are currently solving this by explicitely storing
the original timestamp via a trigger on insert. I wonder
whether a good intermediate solution would be to have an
"officially supported" (whatever that means) composite
type ?

Karsten
--
GPG key ID E4071346 @ wwwkeys.pgp.net
E167 67FD A291 2BEA 73BD 4537 78B9 A9F9 E407 1346

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Michael Fuhr 2005-12-13 19:34:19 Re: timestamp <-> ctime conversion question...
Previous Message Greg Stark 2005-12-13 19:09:21 Re: Performance large tables.