summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAdam Baratz <adambaratz@php.net>2017-10-31 16:43:26 -0400
committerAdam Baratz <adambaratz@php.net>2017-10-31 16:43:35 -0400
commit2ecfcdaf1b94868756cabbbb2c33276f823dafd7 (patch)
treef772b29e0c0889c2ded450fef71d9fe451becfcd
parentbbfd0df9d3903f1a5faa301e553de92372d70f03 (diff)
downloadphp-git-2ecfcdaf1b94868756cabbbb2c33276f823dafd7.tar.gz
Use size_t instead of int, use more specific format string
-rw-r--r--ext/pdo_dblib/dblib_stmt.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/ext/pdo_dblib/dblib_stmt.c b/ext/pdo_dblib/dblib_stmt.c
index 469bd790de..2cebe982e4 100644
--- a/ext/pdo_dblib/dblib_stmt.c
+++ b/ext/pdo_dblib/dblib_stmt.c
@@ -330,14 +330,14 @@ static int pdo_dblib_stmt_get_col(pdo_stmt_t *stmt, int colno, char **ptr,
}
case SQLDATETIME:
case SQLDATETIM4: {
- int dl;
+ size_t dl;
DBDATEREC di;
DBDATEREC dt;
dbconvert(H->link, coltype, data, -1, SQLDATETIME, (LPBYTE) &dt, -1);
dbdatecrack(H->link, &di, (DBDATETIME *) &dt);
- dl = spprintf(&tmp_data, 20, "%d-%02d-%02d %02d:%02d:%02d",
+ dl = spprintf(&tmp_data, 20, "%04d-%02d-%02d %02d:%02d:%02d",
#if defined(PHP_DBLIB_IS_MSSQL) || defined(MSDBLIB)
di.year, di.month, di.day, di.hour, di.minute, di.second
#else