php - Getting wrong value for variant_date_to_timestamp() function -
in relation this question, i'm getting wrong value the modified date when querying windows adodb connection indexing files.
this line or query:
$recordset - > open("select system.itemname, system.datemodified systemindex directory='file:c:/xxxx/' , contains('xxxx')", $conn); i've getting results on localhost (php 5.5.6), not in other servers (php 5.5.8). i'm getting wrong timestamp value , therefore converts wrong date when use php functions create customized format:
date_default_timezone_set(ini_get('date.timezone')); $date = $recordset->fields->item("system.datemodified")->value; $timestamp = variant_date_to_timestamp($date); //getting wrong date here $file['date'] => date('d-m-y h:i:s', $timestamp); there's different of hours between expected result , result i'm getting. (2 hours)
it seems related variant_date_to_timestamp function of php. i've set proper date.timezone in php.ini file , added date_default_timezone_set call before calling variant_date_to_timestamp.
i'm using php 5.5.8.
i've found similar problem/bug commented on 2004. talks 2 hours difference well. find difficult believe hasn't been solved yet.
Comments
Post a Comment