diff options
| author | Mark A. Hershberger <mah@debian.(none)> | 2009-03-25 00:37:27 -0400 |
|---|---|---|
| committer | Mark A. Hershberger <mah@debian.(none)> | 2009-03-25 00:37:27 -0400 |
| commit | 2d4e5b09576bb4f0ba716cc82cdf29ea04d9184b (patch) | |
| tree | 41ccc042009cba53e4ce43e727fcba4c1cfbf7f3 /ext/sqlite/libsqlite/src/date.c | |
| parent | d29a4fd2dd3b5d4cf6e80b602544d7b71d794e76 (diff) | |
| download | php-upstream/5.2.2.tar.gz | |
Imported Upstream version 5.2.2upstream/5.2.2
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; |
