Re: Timestamp to time_t - Mailing list pgsql-hackers

From Tom Lane
Subject Re: Timestamp to time_t
Date
Msg-id 13023.1253029807@sss.pgh.pa.us
Whole thread Raw
In response to Re: Timestamp to time_t  (David Fetter <david@fetter.org>)
Responses Re: Timestamp to time_t
List pgsql-hackers
David Fetter <david@fetter.org> writes:
> On Tue, Sep 15, 2009 at 11:02:52AM -0400, Tom Lane wrote:
>> EXTRACT()?

> I see that EXTRACT() can take a time zone as input, but I don't see
> anywhere that could distinguish among the following inputs, once
> stored, as they have identical representations in UTC:

See TIMEZONE_HOUR, TIMEZONE_MINUTE field specifications, in particular
           b) Otherwise, let TZ be the interval value of the implicit             or explicit time zone associated with
the<datetime value             expression>. If <extract field> is TIMEZONE_HOUR, then the             result is
calculatedas
 
                EXTRACT (HOUR FROM TZ)
             Otherwise, the result is calculated as
                EXTRACT (MINUTE FROM TZ)

I haven't tracked down whether the phrase "implicit or explicit time
zone" is hiding any interesting weasel words, but it sure *looks* like
you are supposed to be able to pull out the TZ offset.
        regards, tom lane


pgsql-hackers by date:

Previous
From: Devrim GÜNDÜZ
Date:
Subject: Re: PGCluster-II Progress
Next
From: std pik
Date:
Subject: hardware information