From aa@devshock.com Thu Nov 22 15:37:07 2012 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtp (Exim 4.72) (envelope-from ) id 1TbYpv-0000Je-Iu for pgsql-admin@postgresql.org; Thu, 22 Nov 2012 15:37:07 +0000 Received: from mail-gh0-f174.google.com ([209.85.160.174]) by magus.postgresql.org with esmtp (Exim 4.72) (envelope-from ) id 1TbYpt-0002UG-6g for pgsql-admin@postgresql.org; Thu, 22 Nov 2012 15:37:06 +0000 Received: by mail-gh0-f174.google.com with SMTP id g15so898189ghb.19 for ; Thu, 22 Nov 2012 07:37:03 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=from:to:references:in-reply-to:subject:date:message-id:mime-version :content-type:x-mailer:thread-index:content-language :x-gm-message-state; bh=kuZ/SeZVs6lN59BgNQ/Uk7LGwCt4A17Vj0qKFI7RKx4=; b=UrMRIpQ9s94gR81JXf9QpYpfjVU0fKMom85tkhcuN4RaYM/fe54jXXai2DaTK2AtgU pCSYjpbBIa6SuXOlv9o/fl7ctQ0mCjfDDWO+JwWTWhN3kwKPL3fQMRVvlSXP9eluhj6I yePgnLWyTYFZhRftkKEz82owZ3WHWZt87Q/tbF/3hbELEdOkFBYrC4lwLIkLFguilx3w 6S7rIDlIr/tqQKcxNfDkUw2aIQ9r4NN31WXIaDgucbD07DrVwCDuY4jG2Jm2hqehBgsR XjtW0nQwgeaASGDEyVt8lYkTbvBNTXiSaW/5aSkCVleVjcpAL318EswLsK6zVbuDowQP 6qIQ== Received: by 10.236.92.15 with SMTP id i15mr791379yhf.85.1353598623407; Thu, 22 Nov 2012 07:37:03 -0800 (PST) Received: from AnibalVAIO ([190.128.222.90]) by mx.google.com with ESMTPS id s1sm3280432anj.1.2012.11.22.07.36.56 (version=TLSv1/SSLv3 cipher=OTHER); Thu, 22 Nov 2012 07:37:02 -0800 (PST) From: "Anibal David Acosta" To: References: In-Reply-To: Subject: timezone, how postgres deal with it? Date: Thu, 22 Nov 2012 12:36:42 -0300 Message-ID: <004701cdc8c7$3a5cf4b0$af16de10$@devshock.com> MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_NextPart_000_0048_01CDC8AE.151058F0" X-Mailer: Microsoft Outlook 14.0 Thread-Index: Ac3HaGa1faqv5r8MQk2drsOkqp3XQABXm3wA Content-Language: es-py X-Gm-Message-State: ALoCoQmoMMBnVrfd/HxlOCpeXNFtkmbUfnvZCeRv3Mh8rzWwcd/y+B2szdR4uSot4pUCJy+XQ/MT X-Pg-Spam-Score: -2.6 (--) X-Archive-Number: 201211/117 X-Sequence-Number: 40362 This is a multipart message in MIME format. ------=_NextPart_000_0048_01CDC8AE.151058F0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit This query returns false select ('2012-11-20 17:00:00-02:00'::timestamp with time zone) = ('2012-11-20 18:00:00-03:00'::timestamp with time zone) But are exactly same time Why? timestamp with timezone just show/hide time zone? thanks ------=_NextPart_000_0048_01CDC8AE.151058F0 Content-Type: text/html; charset="us-ascii" Content-Transfer-Encoding: quoted-printable

This query = returns false

 

select ('2012-11-20 17:00:00-02:00'::timestamp with = time zone) =3D ('2012-11-20 18:00:00-03:00'::timestamp with time = zone)

 

But are exactly same time

 

Why?

 

timestamp = with timezone just show/hide time zone?

 

thanks

 

 

------=_NextPart_000_0048_01CDC8AE.151058F0-- From tgl@sss.pgh.pa.us Thu Nov 22 15:55:03 2012 Received: from makus.postgresql.org ([98.129.198.125]) by malur.postgresql.org with esmtp (Exim 4.72) (envelope-from ) id 1TbZ7H-0002nY-O4 for pgsql-admin@postgresql.org; Thu, 22 Nov 2012 15:55:03 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by makus.postgresql.org with esmtp (Exim 4.72) (envelope-from ) id 1TbZ7F-0007GM-AH for pgsql-admin@postgresql.org; Thu, 22 Nov 2012 15:55:02 +0000 Received: from sss2.sss.pgh.pa.us (tgl@localhost [127.0.0.1]) by sss.pgh.pa.us (8.14.5/8.14.5) with ESMTP id qAMFt0PS027541; Thu, 22 Nov 2012 10:55:00 -0500 (EST) From: Tom Lane To: "Anibal David Acosta" cc: pgsql-admin@postgresql.org Subject: Re: timezone, how postgres deal with it? In-reply-to: <004701cdc8c7$3a5cf4b0$af16de10$@devshock.com> References: <004701cdc8c7$3a5cf4b0$af16de10$@devshock.com> Comments: In-reply-to "Anibal David Acosta" message dated "Thu, 22 Nov 2012 12:36:42 -0300" Date: Thu, 22 Nov 2012 10:55:00 -0500 Message-ID: <27540.1353599700@sss.pgh.pa.us> X-Pg-Spam-Score: -2.3 (--) X-Archive-Number: 201211/118 X-Sequence-Number: 40363 "Anibal David Acosta" writes: > This query returns false > select ('2012-11-20 17:00:00-02:00'::timestamp with time zone) = > ('2012-11-20 18:00:00-03:00'::timestamp with time zone) > But are exactly same time No, they aren't. You're apparently still confused about the sign of timezone offsets. The first one corresponds to 19:00 GMT, the second to 21:00 GMT. BTW, why are you posting the exact same question you posted two days ago on another list? regards, tom lane From laurenz.albe@wien.gv.at Thu Nov 22 16:06:19 2012 Received: from magus.postgresql.org ([87.238.57.229]) by malur.postgresql.org with esmtp (Exim 4.72) (envelope-from ) id 1TbZIA-0003TG-W2 for pgsql-admin@postgresql.org; Thu, 22 Nov 2012 16:06:19 +0000 Received: from relay-fr112.magwien.gv.at ([217.149.225.66]) by magus.postgresql.org with esmtp (Exim 4.72) (envelope-from ) id 1TbZI9-0002wR-GK for pgsql-admin@postgresql.org; Thu, 22 Nov 2012 16:06:18 +0000 Received: from localhost (localhost.localdomain [127.0.0.1]) by relay-fr112.magwien.gv.at (Postfix) with ESMTP id 0E0AF4C5A17; Thu, 22 Nov 2012 17:06:16 +0100 (CET) X-Virus-Scanned: by amavisd-new using Sophie and ClamAV at magwien.gv.at Received: from exrat0.host.magwien.gv.at (exrat0.host.magwien.gv.at [--]) by relay-fr112.magwien.gv.at (Postfix) with ESMTP id CA0904C59C7; Thu, 22 Nov 2012 17:06:15 +0100 (CET) Received: from exadv11.host.magwien.gv.at ([--]) by exrat0.host.magwien.gv.at with Microsoft SMTPSVC(6.0.3790.4675); Thu, 22 Nov 2012 17:05:50 +0100 X-MimeOLE: Produced By Microsoft Exchange V6.5 Content-class: urn:content-classes:message MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Subject: Re: timezone, how postgres deal with it? Date: Thu, 22 Nov 2012 17:05:49 +0100 Message-ID: In-Reply-To: <004701cdc8c7$3a5cf4b0$af16de10$@devshock.com> X-MS-Has-Attach: X-MS-TNEF-Correlator: Thread-Topic: [ADMIN] timezone, how postgres deal with it? Thread-Index: Ac3HaGa1faqv5r8MQk2drsOkqp3XQABXm3wAAAEPRVA= References: <004701cdc8c7$3a5cf4b0$af16de10$@devshock.com> From: "Albe Laurenz" To: "Anibal David Acosta *EXTERN*" , X-OriginalArrivalTime: 22 Nov 2012 16:05:50.0208 (UTC) FILETIME=[3DAA0000:01CDC8CB] X-Pg-Spam-Score: -6.9 (------) X-Archive-Number: 201211/119 X-Sequence-Number: 40364 Anibal David Acosta wrote: > This query returns false >=20 > select ('2012-11-20 17:00:00-02:00'::timestamp with time zone) =3D ('2012-11-20 18:00:00- > 03:00'::timestamp with time zone) >=20 > But are exactly same time >=20 > Why? They are not the same. Compare: select ('2012-11-20 17:00:00-02:00'::timestamp with time zone) =3D ('2012-11-20 16:00:00-03:00'::timestamp with time zone) That will return true. Yours, Laurenz Albe