pg.ddx.io  pgsql-php@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Milen A. Radev <mradev@gmail.com>
To: Steve Crawford <scrawford@pinpointresearch.com>
Cc: pgsql-php@postgresql.org
Subject: Re: Converting RFC 2822 "timestamp" to timestampz
Date: Wed, 12 Oct 2005 23:01:03 +0300
Message-ID: <32c009ea0510121301y6da7d43eq@mail.gmail.com> (raw)
In-Reply-To: <200510121231.39909.scrawford@pinpointresearch.com>
References: <32c009ea0510121214x232f57c5w@mail.gmail.com>
	<200510121231.39909.scrawford@pinpointresearch.com>

On 12/10/05, Steve Crawford <scrawford@pinpointresearch.com> wrote:
> On Wednesday 12 October 2005 12:14, Milen A. Radev wrote:
> > I have a RFC2822 timestamp (example: Thu, 21 Dec 2000 16:01:07
> > +0200). I need to convert it to "timestampz" but I stumbled on the
> > timezone conversion....
>
> The following works for me:
>
> # select 'Thu, 21 Dec 2000 16:01:07 +0200'::timestamptz;
>
>       timestamptz
> ------------------------
>  2000-12-21 06:01:07-08


You are so right! I was confused by another bug in my query to believe
that the RFC2822 format is unacceptable.


--
Milen A. Radev



view thread (3+ messages)

Message-ID: <32c009ea0510121301y6da7d43eq@mail.gmail.com>
Permalink:  ../32c009ea0510121301y6da7d43eq@mail.gmail.com/
Also on:    postgresql.org/message-id/32c009ea0510121301y6da7d43eq@mail.gmail.com

 · 

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-php@postgresql.org
  Cc: mradev@gmail.com, scrawford@pinpointresearch.com
  Subject: Re: Converting RFC 2822 "timestamp" to timestampz
  In-Reply-To: <32c009ea0510121301y6da7d43eq@mail.gmail.com>
  References: <32c009ea0510121214x232f57c5w@mail.gmail.com> <200510121231.39909.scrawford@pinpointresearch.com> <32c009ea0510121301y6da7d43eq@mail.gmail.com>

* 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