Re: Binary encoding of TIMESTAMP WITH TIME ZONE - Mailing list pgsql-general

From Tom Lane
Subject Re: Binary encoding of TIMESTAMP WITH TIME ZONE
Date
Msg-id 1375425.1591317171@sss.pgh.pa.us
Whole thread Raw
In response to Binary encoding of TIMESTAMP WITH TIME ZONE  (Joe Abbate <jma@freedomcircle.com>)
Responses Re: Binary encoding of TIMESTAMP WITH TIME ZONE  ("Peter J. Holzer" <hjp-pgsql@hjp.at>)
List pgsql-general
Joe Abbate <jma@freedomcircle.com> writes:
> However, when using the same query using the Rust adapter the transition 
> to a new row started showing up after midgnight GMT.  I opened an issue 
> on Github (https://github.com/sfackler/rust-postgres/issues/608 ) and 
> the maintainer claimed the Rust adapter *had* to initialize timezone to 
> UTC in order to properly convert "to and from time datatypes".  I 
> pointed out that the timezone offset is available in psql and psycopg2, 
> but then he replied the binary encoding of timestamptz does *not* 
> include the timezone offset.

Indeed it does not, just as the on-disk format for it does not.  The
representation is effectively always in UTC.  If you have some other
timezone setting selected, timestamptz_out rotates to that zone for
display purposes ... but the binary format doesn't.

            regards, tom lane



pgsql-general by date:

Previous
From: Joe Abbate
Date:
Subject: Binary encoding of TIMESTAMP WITH TIME ZONE
Next
From: Paul Förster
Date:
Subject: Re: PostgreSQL 11 with SSL on Linux