Re: int4 -> unix timestamp -> sql timestamp; abstime?

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: David Fetter <david(at)fetter(dot)org>
Cc: Roman Neuhauser <neuhauser(at)chello(dot)cz>, pgsql-general(at)postgresql(dot)org
Subject: Re: int4 -> unix timestamp -> sql timestamp; abstime?
Date: 2005-01-12 00:44:46
Message-ID: 5655.1105490686@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

David Fetter <david(at)fetter(dot)org> writes:
>> The recommended locution is
>>
>> SELECT TIMESTAMP WITH TIME ZONE 'epoch' + <x> * INTERVAL '1 second';

> I think this should read:

> SELECT TIMESTAMP WITH TIME ZONE 'epoch' AT TIME ZONE 'UTC' + <x> * INTERVAL '1 second';
> /* ^^^^^^^^^^^^^^^^^^ */

It's correct as written; your modification throws it off by the local GMT
offset.

regards, tom lane

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Roman Neuhauser 2005-01-12 00:54:49 Re: int4 -> unix timestamp -> sql timestamp; abstime?
Previous Message David Fetter 2005-01-12 00:40:25 Re: int4 -> unix timestamp -> sql timestamp; abstime?