X-Original-To: pgsql-php-postgresql.org@localhost.postgresql.org Received: from localhost (av.hub.org [200.46.204.144]) by svr1.postgresql.org (Postfix) with ESMTP id 406C1D721C for ; Wed, 12 Oct 2005 16:31:43 -0300 (ADT) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 09622-06 for ; Wed, 12 Oct 2005 19:31:38 +0000 (GMT) Received: from polaris.pinpointresearch.com (66-7-238-130.cust.telepacific.net [66.7.238.130]) by svr1.postgresql.org (Postfix) with ESMTP id BFE62D76DC for ; Wed, 12 Oct 2005 16:31:39 -0300 (ADT) Received: from betelgeuse.pinpointresearch.com (betelgeuse.pinpointresearch.com [192.168.1.179]) by polaris.pinpointresearch.com (Postfix) with ESMTP id D23AB10391; Wed, 12 Oct 2005 12:31:40 -0700 (PDT) From: Steve Crawford Organization: PinPoint Research To: pgsql-php@postgresql.org, milen@radev.net Subject: Re: Converting RFC 2822 "timestamp" to timestampz Date: Wed, 12 Oct 2005 12:31:39 -0700 User-Agent: KMail/1.8 References: <32c009ea0510121214x232f57c5w@mail.gmail.com> In-Reply-To: <32c009ea0510121214x232f57c5w@mail.gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200510121231.39909.scrawford@pinpointresearch.com> X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=0.064 required=5 tests=[AWL=0.014, FORGED_RCVD_HELO=0.05] X-Spam-Level: X-Archive-Number: 200510/24 X-Sequence-Number: 3292 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