Received: from studict.student.utwente.nl (studict.student.utwente.nl [130.89.220.2]) by mail.postgresql.org (8.11.1/8.11.1) with ESMTP id f0RBVNq41571 for ; Sat, 27 Jan 2001 06:31:23 -0500 (EST) (envelope-from rien@cal018043.student.utwente.nl) Received: from rename-it.student.utwente.nl (cal018043.student.utwente.nl [130.89.228.51]) by studict.student.utwente.nl (8.9.3/MQT) with ESMTP id MAA10090 for ; Sat, 27 Jan 2001 12:31:20 +0100 (MET) Message-ID: <3A72B37E.1000400@rename-it.student.utwente.nl> Date: Sat, 27 Jan 2001 12:39:42 +0100 From: Rien Broekstra User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; 0.7) Gecko/20010109 X-Accept-Language: en MIME-Version: 1.0 To: pgsql-php@postgresql.org Subject: strtotime() and postgresql date/time output Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-Archive-Number: 200101/73 X-Sequence-Number: 138 I have the following problem I want to save timestamps in a database and use them in a php script. According to the documentation, postgres's date/time output is possible in 4 styles. My problem is that the php strtotime() function which I use to get a timestamp instead of a date/time string does not understand any of these date/time formats. - Is it possible to manually define a datestyle so Postgresql returns a date/time string which strtotime does understand? - Is it possible to let Postgresql return just a timestamp instead of a date/time string - Is there another function in php which does understand standard ISO or SQL style date/time strings and converts them to a timestamp? thanks in advance -- Rien Broekstra a.k.a Rienzilla ICQ: 35629366 The Drunk Snipers: unreal.snt.utwente.nl Mail: rien@rename-it.student.utwente.nl Vestingbar: www.vestingbar.nl