mirror of
https://github.com/php/php-src.git
synced 2026-04-29 03:03:26 +02:00
last set of zts fixes
This commit is contained in:
@@ -53,6 +53,7 @@
|
||||
#include <stdlib.h>
|
||||
#include <assert.h>
|
||||
#include <time.h>
|
||||
#include "main/php_reentrancy.h"
|
||||
|
||||
#ifndef SQLITE_OMIT_DATETIME_FUNCS
|
||||
|
||||
@@ -393,7 +394,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 ){
|
||||
@@ -412,7 +413,8 @@ static double localtimeOffset(DateTime *p){
|
||||
computeJD(&x);
|
||||
t = (x.rJD-2440587.5)*86400.0 + 0.5;
|
||||
sqlite3OsEnterMutex();
|
||||
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;
|
||||
|
||||
Reference in New Issue
Block a user