MFH: php_localtime_r() checks

This commit is contained in:
Antony Dovgal 2007-06-07 09:07:36 +00:00
parent d042fd0675
commit 074b58b7f1
5 changed files with 20 additions and 4 deletions

View file

@ -420,6 +420,9 @@ static double localtimeOffset(DateTime *p){
t = (x.rJD-2440587.5)*86400.0 + 0.5;
sqliteOsEnterMutex();
pTm = php_localtime_r(&t, &tmbuf);
if (!pTm) {
return 0;
}
y.Y = pTm->tm_year + 1900;
y.M = pTm->tm_mon + 1;
y.D = pTm->tm_mday;