Received: from localhost (postgresql.org [64.49.215.8]) by postgresql.org (Postfix) with ESMTP id A1F5E4760CB for ; Wed, 6 Nov 2002 15:05:10 -0500 (EST) Received: from socrates.catalyst.net.nz (socrates.catalyst.net.nz [203.96.153.226]) by postgresql.org (Postfix) with ESMTP id AEA61476099 for ; Wed, 6 Nov 2002 15:05:09 -0500 (EST) Received: from kant.catalyst.net.nz (hume.catalyst.net.nz [203.96.153.228]) by socrates.catalyst.net.nz (8.12.3/8.12.3/Debian -4) with ESMTP id gA6K5816015878; Thu, 7 Nov 2002 09:05:08 +1300 Received: from 127.0.0.1 (ident=unknown) by kant.catalyst.net.nz with esmtp (masqmail 0.2.14) id 189WQG-5sX-00; Thu, 07 Nov 2002 09:05:08 +1300 Subject: Re: Handling timestampz datatype From: Andrew McMillan To: David Busby Cc: pgsql-php@postgresql.org In-Reply-To: <01fe01c285bf$72863140$4000000a@busbydev> References: <01fe01c285bf$72863140$4000000a@busbydev> Content-Type: text/plain Organization: Message-Id: <1036613108.20147.27.camel@kant.mcmillan.net.nz> Mime-Version: 1.0 X-Mailer: Ximian Evolution 1.1.90 (Preview Release) Date: 07 Nov 2002 09:05:08 +1300 Content-Transfer-Encoding: 7bit X-Virus-Scanned: by AMaViS new-20020517 X-Archive-Number: 200211/18 X-Sequence-Number: 1600 On Thu, 2002-11-07 at 07:08, David Busby wrote: > List, > How are you all dealing with the timestampz data type in your PG/PHP > applications? I cannot seem to find the reliable way to deal with them (for > display purposes). My timestampz column comes into my PHP script as a text > string, I have to convert (using strtotime()) first then use strftime() to > format it. Any ideas on the easy way to do this? Woops :-) I mean "to_char()" :-) Cheers, Andrew. -- --------------------------------------------------------------------- Andrew @ Catalyst .Net.NZ Ltd, PO Box 11-053, Manners St, Wellington WEB: http://catalyst.net.nz/ PHYS: Level 2, 150-154 Willis St DDI: +64(4)916-7201 MOB: +64(21)635-694 OFFICE: +64(4)499-2267 Survey for nothing with http://survey.net.nz/ ---------------------------------------------------------------------