Re: How to convert a UnixTimestamp to a PostgreSQL date without using ::abstime ? - Mailing list pgsql-general

From Bruno Wolff III
Subject Re: How to convert a UnixTimestamp to a PostgreSQL date without using ::abstime ?
Date
Msg-id 20030910032800.GB18726@wolff.to
Whole thread Raw
In response to How to convert a UnixTimestamp to a PostgreSQL date without using ::abstime ?  ("Bruno BAGUETTE" <pgsql-ml@baguette.net>)
List pgsql-general
On Wed, Sep 10, 2003 at 01:47:20 +0200,
  Bruno BAGUETTE <pgsql-ml@baguette.net> wrote:
>
> I'm looking for a way to convert a unix timestamp to a PostgreSQL date
> without using ::abstime which seems to be deprecated.

There are other ways to do it, but based on comments from developers
I have seen in the past, abstime isn't going away any time soon.

One other approach would be to multiply a 1 second interval by the
timestamp and add it to a timestamp corresponding to the unix epoch
(00:00:00 on January 1, 1970 if I remember correctly). But your current
method is probably going to be faster.

pgsql-general by date:

Previous
From: Jonathan Bartlett
Date:
Subject: Re: Picture with Postgres and Delphi
Next
From: "Marc G. Fournier"
Date:
Subject: Re: State of Beta 2