Re: definative way to place secs from epoc into timestamp - Mailing list pgsql-sql

From Tom Lane
Subject Re: definative way to place secs from epoc into timestamp
Date
Msg-id 27400.1109949254@sss.pgh.pa.us
Whole thread Raw
In response to Re: definative way to place secs from epoc into timestamp  (Andrew - Supernews <andrew+nonews@supernews.com>)
List pgsql-sql
Andrew - Supernews <andrew+nonews@supernews.com> writes:
> On 2005-03-04, Bret Hughes <bhughes@elevating.com> 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$ dateFri Mar  4 15:11:31 GMT 2005$ export TZ=EST5EDT$ dateFri 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


pgsql-sql by date:

Previous
From: "Joel Fradkin"
Date:
Subject: Re: definative way to place secs from epoc into timestamp
Next
From: Ken Johanson
Date:
Subject: Re: definative way to place secs from epoc into timestamp