timestamps, epoch and time zones

From: "Alberto Colombo" <alberto(dot)colombo(at)ipsotek(dot)com>
To: <pgsql-general(at)postgresql(dot)org>
Subject: timestamps, epoch and time zones
Date: 2010-01-22 11:45:30
Message-ID: 01414BFB2D0D384DA3C5EE7C16E65759A59C93@ipserv001.headquarters.ipsotek.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Hello,

Maybe it's a question for pgsql-novice, but I have a problem converting
to and from unix times. In particular, it seems that a round trip
unix->PG->unix does not return the original timestamp:

select extract(epoch from timestamp 'epoch');

date_part

-----------

-3600

Shouldn't that be zero? My timezone is Europe/London (but does it
matter?).

Thanks

Alberto

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Alban Hertroys 2010-01-22 12:11:06 Re: Optimization on JOIN
Previous Message Alan Millington 2010-01-22 10:27:20 Re: Error "invalid byte sequence for encoding UTF8" on insert into BYTEA column