#29595 [Asn->Csd]: strtotime can't interpret postgres "timestamp" values
| From: | derick@php.net | Date: | Mon, 11 Jul 2005 07:08:27 +0000 |
| Subject: | #29595 [Asn->Csd]: strtotime can't interpret postgres "timestamp" values | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-81658@lists.php.net to get a copy of this message | ||
ID: 29595
Updated by: derick@php.net
Reported By: phpbugs at blackbird dot net dot au
-Status: Assigned
+Status: Closed
Bug Type: Feature/Change Request
Operating System: FreeBSD 5.2.1
PHP Version: 4.3.8
Assigned To: derick
New Comment:
This bug has been fixed in CVS.
Snapshots of the sources are packaged every three hours; this change
will be in the next snapshot. You can grab the snapshot at
http://snaps.php.net/.
Thank you for the report, and for helping us make PHP better.
Fixed for PHP 5.1.
Previous Comments:
------------------------------------------------------------------------
[2004-08-10 08:54:58] derick@php.net
It's a feature request (and this is already working in the new
date/time parsing routines for 5.1.x)
------------------------------------------------------------------------
[2004-08-10 07:24:01] phpbugs at blackbird dot net dot au
Description:
------------
I'm not sure whether this is strictly speaking a bug or a feature
request, but strtotime doesn't seem to be able to interpret the output
from a PostgreSQL 7.3.3 "timestamp" field.
Reproduce code:
---------------
<?php
$from_postgres = '2004-08-09 14:48:27.304809+10';
echo strtotime($from_postgres);
?>
Expected result:
----------------
It should print the unix timestamp for the given date.
Actual result:
--------------
int(-1)
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=29595&edit=1