Bug #17988 Updated: strtotime fails to parse timestamp type from postgresql
| From: | jam at newimage dot com | Date: | Wed, 26 Jun 2002 04:58:41 +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-12099@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:
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?
Previous Comments:
------------------------------------------------------------------------
[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