diff options
Diffstat (limited to 'ext/sqlite/libsqlite/src/date.c')
| -rw-r--r-- | ext/sqlite/libsqlite/src/date.c | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/ext/sqlite/libsqlite/src/date.c b/ext/sqlite/libsqlite/src/date.c index 233aa7bb3..d1d7ddb5f 100644 --- a/ext/sqlite/libsqlite/src/date.c +++ b/ext/sqlite/libsqlite/src/date.c @@ -16,7 +16,7 @@ ** sqliteRegisterDateTimeFunctions() found at the bottom of the file. ** All other code has file scope. ** -** $Id: date.c,v 1.3.4.1 2005/09/07 15:11:32 iliaa Exp $ +** $Id: date.c,v 1.3.4.1.2.2 2006/12/01 20:24:58 fmk Exp $ ** ** NOTES: ** @@ -53,6 +53,9 @@ #include <stdlib.h> #include <assert.h> #include <time.h> +#ifndef PHP_WIN32 +#include "main/php_reentrancy.h" +#endif #ifndef SQLITE_OMIT_DATETIME_FUNCS @@ -397,7 +400,7 @@ static void clearYMD_HMS_TZ(DateTime *p){ static double localtimeOffset(DateTime *p){ DateTime x, y; time_t t; - struct tm *pTm; + struct tm *pTm, tmbuf; x = *p; computeYMD_HMS(&x); if( x.Y<1971 || x.Y>=2038 ){ @@ -416,7 +419,7 @@ static double localtimeOffset(DateTime *p){ computeJD(&x); t = (x.rJD-2440587.5)*86400.0 + 0.5; sqliteOsEnterMutex(); - pTm = localtime(&t); + pTm = php_localtime_r(&t, &tmbuf); y.Y = pTm->tm_year + 1900; y.M = pTm->tm_mon + 1; y.D = pTm->tm_mday; |
