timestamps, epoch and time zones - Mailing list pgsql-general

From Alberto Colombo
Subject timestamps, epoch and time zones
Date
Msg-id 01414BFB2D0D384DA3C5EE7C16E65759A59C93@ipserv001.headquarters.ipsotek.com
Whole thread Raw
Responses Re: timestamps, epoch and time zones
List 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

pgsql-general by date:

Previous
From: Alan Millington
Date:
Subject: Re: Error "invalid byte sequence for encoding UTF8" on insert into BYTEA column
Next
From: Alban Hertroys
Date:
Subject: Re: Optimization on JOIN