From:             is01yj at student dot zsu dot edu dot cn
Operating system: Windows XP
PHP version:      4.3.9
PHP Bug Type:     COM related
Bug description:  error reading ADODB date type?

Description:
------------
This summer vacation I used COM(in PHP 5.0.1) to call ADODB in order to
read some data from an Access Database. The database contained some fields
in date type. Everything just ran well.
Later, I removed my pages to another server using PHP 4.3.9 and I found
the data in date type can not be read correctly.
Should I just update PHP on this server to version above 5.0 in order to
solve this problem? 

Reproduce code:
---------------
$MM_Conn_STRING="Provider=Microsoft.Jet.OLEDB.4.0;Data
Source=db/xinghaiwww.mdb";
$connection=new COM("ADODB.Connection");
$connection->open($MM_Conn_STRING);
$rs=new COM("ADODB.RecordSet");
$strsql="select top 5 * from order by article_postdate desc";
$rs->open($strsql,$connection, 1, 1);

while (!$rs->eof) {
     $timestr=$rs->fields['article_postdate']->value;
//'article_postdate' is a field in date type
//.........
//ouput $timestr

Expected result:
----------------
in php 5.0.1, $timestr should be:
2004-8-26 17:44:58

Actual result:
--------------
in php 4.3.9, it became a string of numbers:
1093513498

-- 
Edit bug report at http://bugs.php.net/?id=30261&edit=1
-- 
Try a CVS snapshot (php4):   http://bugs.php.net/fix.php?id=30261&r=trysnapshot4
Try a CVS snapshot (php5.0): http://bugs.php.net/fix.php?id=30261&r=trysnapshot50
Try a CVS snapshot (php5.1): http://bugs.php.net/fix.php?id=30261&r=trysnapshot51
Fixed in CVS:                http://bugs.php.net/fix.php?id=30261&r=fixedcvs
Fixed in release:            http://bugs.php.net/fix.php?id=30261&r=alreadyfixed
Need backtrace:              http://bugs.php.net/fix.php?id=30261&r=needtrace
Need Reproduce Script:       http://bugs.php.net/fix.php?id=30261&r=needscript
Try newer version:           http://bugs.php.net/fix.php?id=30261&r=oldversion
Not developer issue:         http://bugs.php.net/fix.php?id=30261&r=support
Expected behavior:           http://bugs.php.net/fix.php?id=30261&r=notwrong
Not enough info:             http://bugs.php.net/fix.php?id=30261&r=notenoughinfo
Submitted twice:             http://bugs.php.net/fix.php?id=30261&r=submittedtwice
register_globals:            http://bugs.php.net/fix.php?id=30261&r=globals
PHP 3 support discontinued:  http://bugs.php.net/fix.php?id=30261&r=php3
Daylight Savings:            http://bugs.php.net/fix.php?id=30261&r=dst
IIS Stability:               http://bugs.php.net/fix.php?id=30261&r=isapi
Install GNU Sed:             http://bugs.php.net/fix.php?id=30261&r=gnused
Floating point limitations:  http://bugs.php.net/fix.php?id=30261&r=float
MySQL Configuration Error:   http://bugs.php.net/fix.php?id=30261&r=mysqlcfg

Reply via email to