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