diff options
author | Ilia Alshanetsky <iliaa@php.net> | 2006-11-30 16:38:37 +0000 |
---|---|---|
committer | Ilia Alshanetsky <iliaa@php.net> | 2006-11-30 16:38:37 +0000 |
commit | ca89b6dedd5e2a790ba909e4eecdfd5fdce721b3 (patch) | |
tree | 8e1a2e1c25d52a7a76e11d82980c6792ee206f03 /ext/sqlite/libsqlite/src | |
parent | c69555b94895d360cd66a42547764ab43b457d03 (diff) | |
download | php-git-ca89b6dedd5e2a790ba909e4eecdfd5fdce721b3.tar.gz |
last set of zts fixes
Diffstat (limited to 'ext/sqlite/libsqlite/src')
-rw-r--r-- | ext/sqlite/libsqlite/src/date.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/ext/sqlite/libsqlite/src/date.c b/ext/sqlite/libsqlite/src/date.c index c7489ec078..f994e0769f 100644 --- a/ext/sqlite/libsqlite/src/date.c +++ b/ext/sqlite/libsqlite/src/date.c @@ -53,6 +53,7 @@ #include <stdlib.h> #include <assert.h> #include <time.h> +#include "main/php_reentrancy.h" #ifndef SQLITE_OMIT_DATETIME_FUNCS @@ -397,7 +398,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 +417,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; |