Re: Best way to convert PG's TIMESTAMPTZ to PHP DATE? - Mailing list pgsql-php

From Michael Hanna
Subject Re: Best way to convert PG's TIMESTAMPTZ to PHP DATE?
Date
Msg-id 20099B92-AB62-11D7-A8B3-00039308EB2C@hwcn.org
Whole thread Raw
In response to Re: Best way to convert PG's TIMESTAMPTZ to PHP DATE?  ("David Busby" <busby@pnts.com>)
List pgsql-php
for some reason I get:

Wed, 31 Dec 1969 18:59:59 -0500

as output on any entry.

-----

$rows = pg_num_rows($result);

// if records present
if ($rows > 0)
{
         // iterate through resultset
         for ($i=0; $i<$rows; $i++)
         {
                 $row = pg_fetch_object($result, $i);
                $conv_date = date('r',strtotime($row->posted));
         ?>
                 <li><font size="-1"><b><? echo $conv_date; ?></b></font>
                 <br>

                 <font size="-1"><? echo $row->notes; ?></font>
                 <p>
         <?
         }
}

pgsql-php by date:

Previous
From: Jeff
Date:
Subject: Re: PHP form Creates Blank DB entries
Next
From: "David Busby"
Date:
Subject: Re: Best way to convert PG's TIMESTAMPTZ to PHP DATE?