Received: from makus.postgresql.org (makus.postgresql.org [98.129.198.125]) by mail.postgresql.org (Postfix) with ESMTP id 8EF9A930E1E for ; Fri, 3 Aug 2012 14:21:26 -0300 (ADT) Received: from fep19.mx.upcmail.net ([62.179.121.39]) by makus.postgresql.org with esmtp (Exim 4.72) (envelope-from ) id 1SxLYy-00069u-Ry for pgsql-performance@postgresql.org; Fri, 03 Aug 2012 17:21:26 +0000 Received: from edge01.upcmail.net ([192.168.13.236]) by viefep19-int.chello.at (InterMail vM.8.01.05.05 201-2260-151-110-20120111) with ESMTP id <20120803172110.PDUA26940.viefep19-int.chello.at@edge01.upcmail.net>; Fri, 3 Aug 2012 19:21:10 +0200 Received: from [192.168.0.101] ([89.134.225.226]) by edge01.upcmail.net with edge id iHM91j01Q4tiMtV01HM9tM; Fri, 03 Aug 2012 19:21:10 +0200 X-SourceIP: 89.134.225.226 Message-ID: <501C0884.1040106@shopzeus.com> Date: Fri, 03 Aug 2012 19:21:08 +0200 From: Laszlo Nagy User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:14.0) Gecko/20120713 Thunderbird/14.0 MIME-Version: 1.0 To: Steve Crawford , pgsql-performance@postgresql.org Subject: Re: [ADMIN] Messed up time zones References: <501B8C6F.6040100@shopzeus.com> <501BAA84.9010306@shopzeus.com> <501BAE33.4090102@shopzeus.com> <16399.1344003584@sss.pgh.pa.us> <501BED07.5070603@shopzeus.com> <501BFA4F.5010709@pinpointresearch.com> In-Reply-To: <501BFA4F.5010709@pinpointresearch.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Pg-Spam-Score: -1.9 (-) X-Archive-Number: 201208/11 X-Sequence-Number: 47549 > All the above are the exact same point in time merely stated as > relevant to each location. Note that given a timestamp with time zone > and a zone, PostgreSQL returns a timestamp without time zone (you know > the zone since you specified it). Yes, I know the zone. But I don't know the offset from UTC. Example: template1=> set timezone to 'UTC'; SET template1=> select ('2011-10-30 01:00:00'::timestamptz) at time zone 'Europe/Budapest'; timezone --------------------- 2011-10-30 02:00:00 -- Is it winter or summer time? (1 row) template1=> select ('2011-10-30 00:00:00'::timestamptz) at time zone 'Europe/Budapest'; timezone --------------------- 2011-10-30 02:00:00 -- Is it winter or summer time? What is the offset from UTC here? Can you tell me when it was in UTC? (1 row) template1=> What is more: template1=> select (('2011-10-30 00:00:00'::timestamptz) at time zone 'Europe/Budapest') is distinct from (('2011-10-30 01:00:00'::timestamptz) at time zone 'Europe/Budapest'); ?column? ---------- f (1 row) template1=> Yeah, we know what time zone it is in, but we don't know when it was, thanks a lot. :-( It would be unambiguous to store the UTC offset along with the value. But it is not how it was implemented.