Re: definative way to place secs from epoc into timestamp

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: definative way to place secs from epoc into timestamp
Дата
Msg-id 27400.1109949254@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: definative way to place secs from epoc into timestamp  (Andrew - Supernews <andrew+nonews@supernews.com>)
Список 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 по дате отправления:

Предыдущее
От: "Joel Fradkin"
Дата:
Сообщение: Re: definative way to place secs from epoc into timestamp
Следующее
От: Ken Johanson
Дата:
Сообщение: Re: definative way to place secs from epoc into timestamp