Bug #17988 Updated: strtotime fails to parse timestamp type from postgresql

From: Date: Wed, 26 Jun 2002 05:05:24 +0000
Subject: Bug #17988 Updated: strtotime fails to parse timestamp type from postgresql
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-12104@lists.php.net to get a copy of this message
ID: 17988 Updated by: jam@newimage.com Reported By: jam@newimage.com Status: Bogus Bug Type: Feature/Change Request Operating System: redhat 7.3 PHP Version: 4.1.2 New Comment: ok. while I believe parsedate.y needs to be updated to handle floating point seconds values (I've done it, it's not hard to patch), I *do* see the value of the documentation you pointed out, and I think I can get the code to work. thank you for your help. Previous Comments: ------------------------------------------------------------------------ [2002-06-26 00:58:40] jam@newimage.com I have read the docs :) maybe I've missed something (happens all the time).. could you suggest a way to do what I want without using strtotime()? I'm missing something.. is there a way to extract the entire date/time string with postgresql functions? ------------------------------------------------------------------------ [2002-06-26 00:52:59] rasmus@php.net Please go read the docs at the links I supplied. ------------------------------------------------------------------------ [2002-06-26 00:50:30] jam@newimage.com I am attempting to extract a timestamp field from the database and convert it to a php time value. the issue is the value that postgresql hands out for the date-- it contains floating point numbers which parsedate.y doesn't know how to handle. ------------------------------------------------------------------------ [2002-06-26 00:48:12] rasmus@php.net There are all sorts of functions in postgresql to format times. http://www.postgresql.org/idocs/index.php?functions-formatting.html http://www.postgresql.org/idocs/index.php?functions-datetime.html ------------------------------------------------------------------------ [2002-06-26 00:35:09] jam@newimage.com - postgresql 7.2.1 - php 4.1.2 - redhat 7.3 with all applicable patches - field type: timestamp - strtotime() fails to parse dates of the form "2002-06-25 14:18:48.543728-04" because parsedate.y doesn't know how to handle a floating point seconds value. - according to #postgresql, it is not possible to have a timestamp not print the precision, so the issue needs to be handled by php's parsedate.y. - any other details needed, let me know. ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=17988&edit=1

« previous php.bugs (#12104) next »