X-Original-To: pgsql-php-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [64.117.224.193]) by svr1.postgresql.org (Postfix) with ESMTP id 33B0831070D for ; Tue, 1 Jul 2003 01:20:10 +0000 (GMT) Received: from svr1.postgresql.org ([64.117.224.193]) by localhost (svr1.postgresql.org [64.117.224.193]) (amavisd-new, port 10024) with ESMTP id 30663-01 for ; Mon, 30 Jun 2003 22:19:59 -0300 (ADT) Received: from tomts5-srv.bellnexxia.net (tomts5.bellnexxia.net [209.226.175.25]) by svr1.postgresql.org (Postfix) with ESMTP id 6F90D30FD84 for ; Mon, 30 Jun 2003 22:19:58 -0300 (ADT) Received: from hwcn.org ([65.92.41.144]) by tomts5-srv.bellnexxia.net (InterMail vM.5.01.05.32 201-253-122-126-132-20030307) with ESMTP id <20030701011955.HAHP3524.tomts5-srv.bellnexxia.net@hwcn.org>; Mon, 30 Jun 2003 21:19:55 -0400 Date: Mon, 30 Jun 2003 21:19:56 -0400 Subject: Re: Best way to convert PG's TIMESTAMPTZ to PHP DATE? Content-Type: text/plain; charset=US-ASCII; format=flowed Mime-Version: 1.0 (Apple Message framework v552) Cc: To: "David Busby" From: Michael Hanna In-Reply-To: <028801c33f43$184e28c0$1100000a@busbydev> Message-Id: <20099B92-AB62-11D7-A8B3-00039308EB2C@hwcn.org> Content-Transfer-Encoding: quoted-printable X-Mailer: Apple Mail (2.552) X-Archive-Number: 200306/45 X-Sequence-Number: 2109 for some reason I get: Wed, 31 Dec 1969 18:59:59 -0500 as output on any entry. ----- $rows =3D pg_num_rows($result); // if records present if ($rows > 0) { // iterate through resultset for ($i=3D0; $i<$rows; $i++) { $row =3D pg_fetch_object($result, $i); $conv_date =3D date('r',strtotime($row->posted)); ?>

  • =09=09=09=09 notes; ?>

    Both of these work OK for me > > date('r',strtotime($record->date_field)); >