Skip site navigation (1) Skip section navigation (2)

Behavior of "at time zone"

From: Andrew Crouch <andrew(dot)crouch(at)ericsson(dot)com>
To: "pgsql-general(at)postgresql(dot)org" <pgsql-general(at)postgresql(dot)org>
Subject: Behavior of "at time zone"
Date: 2010-01-29 13:34:04
Message-ID: 0180077C49A2B54E9BBA5D6E725A75CD0C9CE5B050@ESGSCCMS0003.eapac.ericsson.se (view raw or flat)
Thread:
Lists: pgsql-general
Hi there,
         I'm looking to use the "at time zone" language feature, however the results below don't really agree with my expectations.  Is this a bug in 8.4 or am I misinterpreting the results?  If it is a bug, has it been fixed in the development releases?


psql (8.4.0)
Type "help" for help.

ispdb_br=> set timezone to '-2';
SET
ispdb_br=> select now();
              now
-------------------------------
 2010-01-29 11:26:22.833697-02
(1 row)

ispdb_br=> select now() at time zone 'BRST';
          timezone
----------------------------
 2010-01-29 11:26:30.521964
(1 row)

ispdb_br=> select now() at time zone '-2';
          timezone
----------------------------
 2010-01-29 15:26:47.010222
(1 row)

ispdb_br=> select now() at time zone '+2';
         timezone
---------------------------
 2010-01-29 11:26:49.55412
(1 row)


Regards,
Andrew

Responses

pgsql-general by date

Next:From: Dave PageDate: 2010-01-29 13:36:16
Subject: Re: ODBC mac os
Previous:From: Enrico PirozziDate: 2010-01-29 13:29:48
Subject: ODBC mac os

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group