Skip to content

Commit ad0a83a

Browse files
committed
Remove HAVE_STRFTIME
Function strftime is part of the C89 standard [1] and current systems don't need to check for its presence anymore. Additionally, checks for strftime function in tests have been removed since the PHP strftime function is now always available. 1: https://port70.net/~nsz/c/c89/c89-draft.html
1 parent 6dd99ff commit ad0a83a

File tree

1 file changed

+0
-15
lines changed

1 file changed

+0
-15
lines changed

ibase_query.c

Lines changed: 0 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1396,22 +1396,7 @@ static int _php_ibase_var_zval(zval *val, void *data, int type, int len, /* {{{
13961396
if (flag & PHP_IBASE_UNIXTIME) {
13971397
ZVAL_LONG(val, mktime(&t));
13981398
} else {
1399-
#if HAVE_STRFTIME
14001399
l = strftime(string_data, sizeof(string_data), format, &t);
1401-
#else
1402-
switch (type & ~1) {
1403-
default:
1404-
l = slprintf(string_data, sizeof(string_data), "%02d/%02d/%4d %02d:%02d:%02d", t.tm_mon+1, t.tm_mday,
1405-
t.tm_year + 1900, t.tm_hour, t.tm_min, t.tm_sec);
1406-
break;
1407-
case SQL_TYPE_DATE:
1408-
l = slprintf(string_data, sizeof(string_data), "%02d/%02d/%4d", t.tm_mon + 1, t.tm_mday, t.tm_year+1900);
1409-
break;
1410-
case SQL_TYPE_TIME:
1411-
l = slprintf(string_data, sizeof(string_data), "%02d:%02d:%02d", t.tm_hour, t.tm_min, t.tm_sec);
1412-
break;
1413-
}
1414-
#endif
14151400
ZVAL_STRINGL(val, string_data, l);
14161401
break;
14171402
}

0 commit comments

Comments
 (0)