pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Frank Bax <fbax@sympatico.ca>
To: Vivek Khera <khera@kcilink.com>
Cc: pgsql-sql@postgresql.org
Subject: Re: Re: Timestamp without time zone
Date: Thu, 14 Jun 2001 17:55:54 -0400
Message-ID: <3.0.6.32.20010614175554.00b3f9f0@pop6.sympatico.ca> (raw)
In-Reply-To: <15144.55328.741285.104733@onceler.kciLink.com>
References: <Pine.BSO.4.10.10106141124160.17529-100000@spider.pilosoft.com>
	<x7n17byur3.fsf@onceler.kciLink.com>
	<Pine.BSO.4.10.10106141124160.17529-100000@spider.pilosoft.com>

	select date_part('epoch',timestamp) from table;
will give you the same result without using str2time at all.
Did I miss something here?

At 11:28 AM 6/14/01 -0400, Vivek Khera wrote:
>>>>>> "AP" == Alex Pilosov <alex@pilosoft.com> writes:
>
>AP> Why do you _want_ to remove timezone from values in database? There is
>AP> definitely a way to work around whatever problem you are having.
>
>Because my normal date parsing routines from perl's Date::Parse
>library don't recognize it, and fail to parse the date.
>
>% perl -MDate::Parse -e 'print str2time("2001-06-14 12:00:00+04"),"\n";'
>
>% perl -MDate::Parse -e 'print str2time("2001-06-14 12:00:00"),"\n";'
>992534400
>
>-- 
>=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
>Vivek Khera, Ph.D.                Khera Communications, Inc.
>Internet: khera@kciLink.com       Rockville, MD       +1-240-453-8497
>AIM: vivekkhera Y!: vivek_khera   http://www.khera.org/~vivek/



view thread (8+ messages)

Message-ID: <3.0.6.32.20010614175554.00b3f9f0@pop6.sympatico.ca>
Permalink:  ../3.0.6.32.20010614175554.00b3f9f0@pop6.sympatico.ca/
Also on:    postgresql.org/message-id/3.0.6.32.20010614175554.00b3f9f0@pop6.sympatico.ca

 · 

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 from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-sql@postgresql.org
  Cc: fbax@sympatico.ca, khera@kcilink.com
  Subject: Re: Timestamp without time zone
  In-Reply-To: <3.0.6.32.20010614175554.00b3f9f0@pop6.sympatico.ca>
  References: <Pine.BSO.4.10.10106141124160.17529-100000@spider.pilosoft.com> <x7n17byur3.fsf@onceler.kciLink.com> <3.0.6.32.20010614175554.00b3f9f0@pop6.sympatico.ca>

* 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