Re: Converting RFC 2822 "timestamp" to timestampz

From: Steve Crawford <scrawford(at)pinpointresearch(dot)com>
To: pgsql-php(at)postgresql(dot)org, milen(at)radev(dot)net
Subject: Re: Converting RFC 2822 "timestamp" to timestampz
Date: 2005-10-12 19:31:39
Message-ID: 200510121231.39909.scrawford@pinpointresearch.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-php

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

Cheers,
Steve

In response to

Responses

Browse pgsql-php by date

  From Date Subject
Next Message Milen A. Radev 2005-10-12 20:01:03 Re: Converting RFC 2822 "timestamp" to timestampz
Previous Message Milen A. Radev 2005-10-12 19:14:32 Converting RFC 2822 "timestamp" to timestampz