From: alain at samoun dot com Operating system: windows XP Pro PHP version: 5.0.0 PHP Bug Type: COM related Bug description: Do not fetch TimeStamp variable
Description: ------------ Problem getting TimeStamp data from Access database XP Pro - PHP 5.0.0 ADODB 2.7 Seems to be a casting problem: Instead of getting for example: 7/7/2004 4:58:10 PM (A Date/Time data type in Access) we get no data in PHP 5. PHP4.3 gets it correctly. Reproduce code: --------------- <?PHP $table= "FORM_ID_274274176"; #Initialize the Database include("adodb.inc.php"); include("adodb-exceptions.inc.php"); #Catch exeptions in PHP5 include("tohtml.inc.php"); $db = &ADONewConnection("ado_access"); #Access database $access = 'C:\Program files\forms3\forms32k.mdb'; $myDSN='PROVIDER=Microsoft.Jet.OLEDB.4.0;' . 'DATA SOURCE=' . $access . ';'; //. 'USER ID=;PASSWORD=;'; @$db->pConnect($myDSN, "", "", ""); #Query Access $query = "SELECT TimeStamp,A,B FROM $table where A ='TOYOTA'"; $result = $db->Execute($query) or die("Error in query: $query. " . $db->ErrorMsg()); echo rs2html($result); ?> Expected result: ---------------- TimeStamp A B 7/7/2004 4:58:10 PM TOYOTA NISSAN 7/7/2004 4:59:00 PM TOYOTA 2 Actual result: -------------- TimeStamp A B Thu 01, Jan 1970 TOYOTA NISSAN Thu 01, Jan 1970 TOYOTA Note the actual value for the TimeStamp variable is 0, I suppose the "Thu 01, Jan 1970" is a default? -- Edit bug report at http://bugs.php.net/?id=29171&edit=1 -- Try a CVS snapshot (php4): http://bugs.php.net/fix.php?id=29171&r=trysnapshot4 Try a CVS snapshot (php5): http://bugs.php.net/fix.php?id=29171&r=trysnapshot5 Fixed in CVS: http://bugs.php.net/fix.php?id=29171&r=fixedcvs Fixed in release: http://bugs.php.net/fix.php?id=29171&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=29171&r=needtrace Need Reproduce Script: http://bugs.php.net/fix.php?id=29171&r=needscript Try newer version: http://bugs.php.net/fix.php?id=29171&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=29171&r=support Expected behavior: http://bugs.php.net/fix.php?id=29171&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=29171&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=29171&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=29171&r=globals PHP 3 support discontinued: http://bugs.php.net/fix.php?id=29171&r=php3 Daylight Savings: http://bugs.php.net/fix.php?id=29171&r=dst IIS Stability: http://bugs.php.net/fix.php?id=29171&r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=29171&r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=29171&r=float