| From: | "Milen A(dot) Radev" <mradev(at)gmail(dot)com> |
|---|---|
| To: | Steve Crawford <scrawford(at)pinpointresearch(dot)com> |
| Cc: | pgsql-php(at)postgresql(dot)org |
| Subject: | Re: Converting RFC 2822 "timestamp" to timestampz |
| Date: | 2005-10-12 20:01:03 |
| Message-ID: | 32c009ea0510121301y6da7d43eq@mail.gmail.com |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-php |
On 12/10/05, Steve Crawford <scrawford(at)pinpointresearch(dot)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
| From | Date | Subject | |
|---|---|---|---|
| Next Message | JUAN ERNESTO FLORES BELTRAN | 2005-10-12 21:04:09 | Install Postgre on Linux Suse 10 |
| Previous Message | Steve Crawford | 2005-10-12 19:31:39 | Re: Converting RFC 2822 "timestamp" to timestampz |