Skip to content

Commit fe43958

Browse files
committed
Ignore IBASE_UNIXTIME flag for TIME / TIME_TZ fields (#95)
1 parent b38f52a commit fe43958

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

ibase_query.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1335,7 +1335,7 @@ static int _php_ibase_var_zval(zval *val, void *data, int type, int len, /* {{{
13351335
isc_decode_timestamp(&ts, &t);
13361336
}
13371337

1338-
if (flag & PHP_IBASE_UNIXTIME) {
1338+
if (((type & ~1) != SQL_TIME_TZ) && (flag & PHP_IBASE_UNIXTIME)) {
13391339
ZVAL_LONG(val, mktime(&t));
13401340
} else {
13411341
char timeBuf[80] = {0};
@@ -1370,7 +1370,7 @@ static int _php_ibase_var_zval(zval *val, void *data, int type, int len, /* {{{
13701370
#if HAVE_STRUCT_TM_TM_ZONE
13711371
t.tm_zone = tzname[0];
13721372
#endif
1373-
if (flag & PHP_IBASE_UNIXTIME) {
1373+
if (((type & ~1) != SQL_TYPE_TIME) && (flag & PHP_IBASE_UNIXTIME)) {
13741374
ZVAL_LONG(val, mktime(&t));
13751375
} else {
13761376
l = strftime(string_data, sizeof(string_data), format, &t);

0 commit comments

Comments
 (0)