Search Postgresql Archives

Re: what is the date format in binary query results

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, 2007-12-12 at 10:16 -0800, Samantha Atkins wrote:
> OK, I read it again.  I don't see anything about how the timezone is  
> specified for this type of column.

I went to the manual instead, see below for a useful section.  Since
the "internally stored value is always in UTC", it doesn't need to
store a timezone in there.  the internal timezone is always UTC.

When you read the contents of the timestamp with timezone column,
it converts it for you, either to the current timezone or a timezone
you specify.

====>

For timestamp with time zone, the internally stored value is always in
UTC (Universal Coordinated Time, traditionally known as Greenwich Mean
Time, GMT). An input value that has an explicit time zone specified is
converted to UTC using the appropriate offset for that time zone. If no
time zone is stated in the input string, then it is assumed to be in the
time zone indicated by the system's timezone parameter, and is converted
to UTC using the offset for the timezone zone. 

When a timestamp with time zone value is output, it is always converted
from UTC to the current timezone zone, and displayed as local time in
that zone. To see the time in another time zone, either change timezone
or use the AT TIME ZONE construct (see Section 9.9.3). 

Conversions between timestamp without time zone and timestamp with time
zone normally assume that the timestamp without time zone value should
be taken or given as timezone local time. A different zone reference can
be specified for the conversion using AT TIME ZONE. 

http://www.postgresql.org/docs/8.2/interactive/datatype-datetime.html#DATATYPE-DATETIME-INTERNALS

<=====


---------------------------(end of broadcast)---------------------------
TIP 6: explain analyze is your friend

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux