|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2009-06-08 17:54 UTC] lester at lsces dot co dot uk
[2009-08-13 09:30 UTC] jani@php.net
[2009-08-21 01:00 UTC] php-bugs at lists dot php dot net
[2009-12-15 01:03 UTC] felipe@php.net
[2009-12-23 01:00 UTC] php-bugs at lists dot php dot net
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Sun Nov 02 08:00:02 2025 UTC |
Description: ------------ Get wrong time values into database when missing %S in ibase.timeformat, like: ini_set('ibase.timeformat', "%H:%M"); Firebird 2.1.1.17910 EXECUTION_DATE = Date field EXECUTION_TIME = Time field ibase_execute($q, "15:00", 670); - FAILD ibase_execute($q, 15 * 3600, 670); - OK Reproduce code: --------------- <?php ini_set('ibase.timeformat', "%H:%M"); ini_set('ibase.dateformat', "%d.%m.%Y"); ini_set('ibase.timestampformat', "%d.%m.%Y %H:%M"); ibase_connect($_CONF['DB']['LOCAL']['HOST'], $_CONF['DB']['LOCAL']['USER'], $_CONF['DB']['LOCAL']['PASS'], "UTF8"); $q = ibase_prepare("UPDATE ORDERS SET EXECUTION_TIME = ? WHERE ID = ?"); ibase_execute($q, "15:00", 670); $q = ibase_query("SELECT EXECUTION_DATE, EXECUTION_TIME FROM ORDERS WHERE ID = 670"); $r = ibase_fetch_object($q); print_r($r); Expected result: ---------------- stdClass Object ( [EXECUTION_DATE] => 05.01.2009 [EXECUTION_TIME] => 15:00 ) Actual result: -------------- stdClass Object ( [EXECUTION_DATE] => 05.01.2009 [EXECUTION_TIME] => 31:00 ) /* When adding IBASE_UNIXTIMES flag, like: $r = ibase_fetch_object($q, IBASE_UNIXTIMES); then [EXECUTION_TIME] => -1 */