Re: epoch from date field

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Laurette Cisneros <laurette(at)nextbus(dot)com>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: epoch from date field
Date: 2002-07-04 04:49:35
Message-ID: 29957.1025758175@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Laurette Cisneros <laurette(at)nextbus(dot)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

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Stephan Szabo 2002-07-04 06:26:44 Re: EVAL and SET equivalents in PostgreSQL
Previous Message Tom Lane 2002-07-04 04:23:17 Re: I am being interviewed by OReilly