mirror of
https://github.com/php/php-src.git
synced 2025-08-19 17:04:47 +02:00
php_localtime_r() checks
This commit is contained in:
parent
976a22df16
commit
f1f0deae4c
5 changed files with 21 additions and 6 deletions
|
@ -418,6 +418,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