mirror of
https://github.com/php/php-src.git
synced 2025-08-18 15:08:55 +02:00
MFH: php_localtime_r() checks
This commit is contained in:
parent
d042fd0675
commit
074b58b7f1
5 changed files with 20 additions and 4 deletions
|
@ -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;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue