#34158 [Opn->Fbk]: Wrong t.tm_isdst flag value.
| From: | sniper@php.net | Date: | Fri, 26 Aug 2005 14:59:46 +0000 |
| Subject: | #34158 [Opn->Fbk]: Wrong t.tm_isdst flag value. | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-84034@lists.php.net to get a copy of this message | ||
ID: 34158
Updated by: sniper@php.net
Reported By: aesthete at telecenter dot ru
-Status: Open
+Status: Feedback
Bug Type: InterBase related
Operating System: Linux 2.6.12 (Fedora Core 3)
PHP Version: 4.4.0
New Comment:
Please try using this CVS snapshot:
http://snaps.php.net/php5-latest.tar.gz
For Windows:
http://snaps.php.net/win32/php5-win32-latest.zip
And try using the PDO Firebird extension instead. (configure with
--with-pdo-firebird)
Previous Comments:
------------------------------------------------------------------------
[2005-08-16 21:37:10] 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.
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=34158&edit=1