From: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
---|---|
To: | andrew(at)supernews(dot)com |
Cc: | pgsql-sql(at)postgresql(dot)org, Bret Hughes <bhughes(at)elevating(dot)com> |
Subject: | Re: definative way to place secs from epoc into timestamp |
Date: | 2005-03-04 15:14:14 |
Message-ID: | 27400.1109949254@sss.pgh.pa.us |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-sql |
Andrew - Supernews <andrew+nonews(at)supernews(dot)com> writes:
> On 2005-03-04, Bret Hughes <bhughes(at)elevating(dot)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
$ 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
From | Date | Subject | |
---|---|---|---|
Next Message | Ken Johanson | 2005-03-04 15:20:24 | Re: definative way to place secs from epoc into timestamp |
Previous Message | Joel Fradkin | 2005-03-04 15:01:32 | Re: definative way to place secs from epoc into timestamp |