Re: epoch from date field - Mailing list pgsql-general

From Tom Lane
Subject Re: epoch from date field
Date
Msg-id 29957.1025758175@sss.pgh.pa.us
Whole thread Raw
In response to epoch from date field  (Laurette Cisneros <laurette@nextbus.com>)
Responses Re: epoch from date field
List pgsql-general
Laurette Cisneros <laurette@nextbus.com> writes:
> select extract(epoch from date(map_date)) from datemaps;
> For a date: 2002-07-04
> it returns 1025740800
> which apparently translates to today (7/3) at 5pm.  Is this right?
> Shouldn't it return the epoch for midnight on 7/4?

You're in GMT-7 to judge by your Date: header.  That *is* midnight,
GMT.

            regards, tom lane



pgsql-general by date:

Previous
From: Tom Lane
Date:
Subject: Re: I am being interviewed by OReilly
Next
From: Justin Clift
Date:
Subject: Another win for PostgreSQL & a good basis for a case study