Re: [GENERAL] timestamps, epoch and time zones

2010-01-22 Thread Alberto Colombo
can get it to work. Regards Alberto -Original Message- From: pgsql-general-ow...@postgresql.org [mailto:pgsql-general-ow...@postgresql.org] On Behalf Of Sam Mason Sent: 22 January 2010 12:25 To: pgsql-general@postgresql.org Subject: Re: [GENERAL] timestamps, epoch and time zones On F

Re: [GENERAL] timestamps, epoch and time zones

2010-01-22 Thread Sam Mason
On Fri, Jan 22, 2010 at 11:45:30AM -, Alberto Colombo wrote: > select extract(epoch from timestamp 'epoch'); > > date_part > --- > -3600 > > Shouldn't that be zero? My timezone is Europe/London (but does it > matter?). Writing "timestamp" like that says that you want the time

[GENERAL] timestamps, epoch and time zones

2010-01-22 Thread Alberto Colombo
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 Sho