unixtime -> timestamp with time zone

From: Ben <bench(at)silentmedia(dot)com>
To: pgsql-general(at)postgresql(dot)org
Subject: unixtime -> timestamp with time zone
Date: 2002-12-02 19:38:20
Message-ID: Pine.LNX.4.44.0212021109580.28241-100000@localhost.localdomain
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

I have a lot of date data in unixtime format, which I'd like to store in
postgres as a timestamp with time zone. In 7.2 I had been able to say:

datetime(1038812385) at time zone 'pst'

which worked great, but in 7.3 this is telling me:

ERROR: Function datetime(integer) does not exist

How can I convert from unixtime to timestamp with time zone? Preferably
without specifying the exact time zone and just using the system default,
instead of the default of utc.

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Magnus Naeslund(f) 2002-12-02 19:46:39 Re: 7.4 Wishlist
Previous Message Hunter Hillegas 2002-12-02 19:26:00 7.3 on OS X HOWTO