Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1VaujE-0006f3-Lv for pgsql-admin@arkaria.postgresql.org; Mon, 28 Oct 2013 21:52:04 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.80) (envelope-from ) id 1VaujD-0008NC-FB for pgsql-admin@arkaria.postgresql.org; Mon, 28 Oct 2013 21:52:03 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1VaujC-0008Mz-Nv for pgsql-admin@postgresql.org; Mon, 28 Oct 2013 21:52:02 +0000 Received: from sam.nabble.com ([216.139.236.26]) by magus.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1Vauj8-0001wd-Px for pgsql-admin@postgresql.org; Mon, 28 Oct 2013 21:52:01 +0000 Received: from [192.168.236.26] (helo=sam.nabble.com) by sam.nabble.com with esmtp (Exim 4.72) (envelope-from ) id 1Vauj6-0000Za-8l for pgsql-admin@postgresql.org; Mon, 28 Oct 2013 14:51:56 -0700 Date: Mon, 28 Oct 2013 14:51:56 -0700 (PDT) From: mark_postgres_user To: pgsql-admin@postgresql.org Message-ID: <1382997116262-5776169.post@n5.nabble.com> Subject: displaying UTC time in local time MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-Pg-Spam-Score: -0.1 (/) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-admin Precedence: bulk Sender: pgsql-admin-owner@postgresql.org In my Postgres 9.1.9 database, I'd like to display a field I created, =E2=80=9Cstart_time=E2=80=9D, in my =E2=80=9Cmisc=E2=80=9D database table. = I=E2=80=99ve defined this field as data type =E2=80=9Ctimestamp without time zone=E2=80=9D. Everything that I've r= ead about Postgres says that that timestamp fields are stored in UTC format. So when these fields are displayed they=E2=80=99ll be converted at that point into = local and show up in local timezone time based on what my server is configured for (currently PDT). But when I run: select start_time from misc where id =3D 29944 start_time ---------------------------- 2013-10-18 06:42:03.974849 (1 row) I don't get the time displayed in local timezone time =3D Pacific/California time: 2013-10-17 23:42:03.974849-07 I've tried all sorts of tinkering to get this timestamp to show up in my local timezone time. Only this seems to work: select start_time at time zone 'UTC' from misc where id =3D 29944 timezone ------------------------------- 2013-10-17 23:42:03.974849-07 (1 row) But this doesn't make sense to me. The timestamp is stored in UTC already.= =20 So asking it to be coerced into UTC timezone time before being displayed seems counter-intuitive. Any clarification is appreciated. Thanks. -- View this message in context: http://postgresql.1045698.n5.nabble.com/displ= aying-UTC-time-in-local-time-tp5776169.html Sent from the PostgreSQL - admin mailing list archive at Nabble.com. --=20 Sent via pgsql-admin mailing list (pgsql-admin@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-admin