pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Richard Huxton <dev@archonet.com>
Cc: pgsql <pgsql-sql@postgresql.org>
Cc: Najm Hashmi <najm@flipr.com>
Subject: Re: Extracting date from epoche
Date: Thu, 21 Jun 2001 10:05:07 -0400
Message-ID: <13009.993132307@sss.pgh.pa.us> (raw)
In-Reply-To: <009c01c0fa32$21fb4cc0$1001a8c0@archonet.com>
References: <3B2F73BA.8EBA2FD1@flipr.com>
	<009c01c0fa32$21fb4cc0$1001a8c0@archonet.com>

"Richard Huxton" <dev@archonet.com> writes:
> Tom - I thought 'epoch'::timestamp should work too - good reason, or just
> One Of Those Things (tm)?

It works --- it's a symbolic value, though.

regression=# select 'epoch'::timestamp;
 ?column?
----------
 epoch
(1 row)

regression=# select 'epoch'::timestamp + ('1 day'::interval);
        ?column?
------------------------
 1970-01-01 19:00:00-05
(1 row)

Note the epoch is midnight GMT = 7pm local time here.

			regards, tom lane



view thread (4+ messages)  latest in thread

Message-ID: <13009.993132307@sss.pgh.pa.us>
Permalink:  ../13009.993132307@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/13009.993132307@sss.pgh.pa.us

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-sql@postgresql.org
  Cc: tgl@sss.pgh.pa.us, dev@archonet.com, najm@flipr.com
  Subject: Re: Extracting date from epoche
  In-Reply-To: <13009.993132307@sss.pgh.pa.us>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox