X-Original-To: pgsql-sql-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.144]) by svr1.postgresql.org (Postfix) with ESMTP id 7565754E9E for ; Fri, 4 Mar 2005 15:14:25 +0000 (GMT) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 90512-05 for ; Fri, 4 Mar 2005 15:14:14 +0000 (GMT) Received: from sss.pgh.pa.us (sss.pgh.pa.us [66.207.139.130]) by svr1.postgresql.org (Postfix) with ESMTP id 53DCD52AA7 for ; Fri, 4 Mar 2005 15:14:11 +0000 (GMT) Received: from sss2.sss.pgh.pa.us (tgl@localhost [127.0.0.1]) by sss.pgh.pa.us (8.13.1/8.13.1) with ESMTP id j24FEEi2027401; Fri, 4 Mar 2005 10:14:15 -0500 (EST) To: andrew@supernews.com Cc: pgsql-sql@postgresql.org, Bret Hughes Subject: Re: definative way to place secs from epoc into timestamp In-reply-to: References: <1109780719.28180.86.camel@bretsony> <13089.1109793126@sss.pgh.pa.us> <1109794066.27857.100.camel@bretsony> <13466.1109795186@sss.pgh.pa.us> <1109828560.27905.137.camel@bretsony> <2bf00b6e6300e2c76bc3c09fa89e7913@myrealbox.com> <1109834845.27905.147.camel@bretsony> <1109915231.28180.182.camel@bretsony> Comments: In-reply-to Andrew - Supernews message dated "Fri, 04 Mar 2005 07:15:02 +0000" Date: Fri, 04 Mar 2005 10:14:14 -0500 Message-ID: <27400.1109949254@sss.pgh.pa.us> From: Tom Lane X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=0.007 tagged_above=0 required=5 tests=AWL X-Spam-Level: X-Archive-Number: 200503/59 X-Sequence-Number: 20538 Andrew - Supernews writes: > On 2005-03-04, Bret Hughes wrote: >>> (Why are you using timestamp without time zone anyway? For recording the >> >> Valid question. Because there is no reason to keep up with time zones > It's a common mistake to think that just because you don't need to keep > track of time zones that somehow using timestamp without time zone is > correct. It is _not_. "timestamp with time zone" and "timestamp without > time zone" have _very_ different semantics. > [ excellent example snipped ] It's curious that people who say they want Unix timestamps find it so hard to wrap their heads around this, because in fact "timestamp with time zone" operates EXACTLY the way that Unix timekeeping is done. Consider this: $ export TZ=GMT $ date Fri Mar 4 15:11:31 GMT 2005 $ export TZ=EST5EDT $ date Fri Mar 4 10:11:35 EST 2005 The system's internal idea of the time didn't change (modulo the few seconds it took to type the commands), but the way it is displayed changed. regards, tom lane