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

From: David Fetter <david(at)fetter(dot)org>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
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 01:02:40
Message-ID: 20050112010240.GA4757@fetter.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Tue, Jan 11, 2005 at 07:44:46PM -0500, Tom Lane wrote:
> 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.

Thanks for the heads-up. I was just about to Do The Wrong Thing(TM)
in a doc patch re: ALTER COLUMN TYPE :)

Cheers,
D
--
David Fetter david(at)fetter(dot)org http://fetter.org/
phone: +1 510 893 6100 mobile: +1 415 235 3778

Remember to vote!

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Greg Stark 2005-01-12 01:06:49 Bug in pg_dump in 7.4.6?
Previous Message Roman Neuhauser 2005-01-12 00:54:49 Re: int4 -> unix timestamp -> sql timestamp; abstime?