|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
[2005-08-16 21:37 UTC] aesthete at telecenter dot ru
Description: ------------ My previos message was about Wrong Time conersion from db: http://bugs.php.net/bug.php?id=34037&edit=1 I solved my problem when comment t.tm_isdst = -1; in interbase.c I don't know is there bug of php or interbase but i have some ideas abot it. In interbase.c we have some code: /* XXX - Might have to remove this later - seems that isc_decode_date() always sets tm_isdst to 0, sometimes incorrectly (InterBase 6 bug?) */ t.tm_isdst = -1; As you say in your comment: "isc_decode_date() always sets tm_isdst to 0" ... thats true. But in gds.cpp (firebird 1.5.2 source) nothing said about changeing tm_isdst (in all gds.cpp) to any value Except for 0 in memset(times, 0, sizeof(*times)) instructions. It always return tm_isdst = 0 in all api functions where "struct tm *times" used as argument! I dont know why you do t.tm_isdst = -1; Therefore strftime(string_data, sizeof(string_data), format, &t) cannot return right formated time string. May be it php bug ?) P.S.: Sorry my english. PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
|
|||||||||||||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Fri Oct 24 21:00:01 2025 UTC |
Ok ... some code: try { $dbh = new PDO ('firebird:dbname=10.0.0.1:/home/dbase/prihod/zakupka.gdb', 'SYSDBA', '1'); foreach ($dbh->query('SELECT NAME FROM CARS ORDER BY NAME') as $row) { echo $row['NAME'].'<br>'; } $dbh = null; } catch (PDOException $e) { print "Error!: " . $e->getMessage() . "<br/>"; die(); } Return right strings. But when i try 'SELECT GEN_ID(GEN_DOSTAVKA_ID,1) FROM RDB$DATABASE' with echo $row['GEN_ID'].'<br>'; nothing return. Probably bug.