mirror of
https://github.com/php/php-src.git
synced 2024-11-23 09:54:15 +08:00
bugfix port
This commit is contained in:
parent
bec518a62d
commit
3b195581db
@ -94,18 +94,16 @@ void _php3_mktime(INTERNAL_FUNCTION_PARAMETERS, int gm)
|
||||
convert_to_long(arguments[i]);
|
||||
}
|
||||
t=time(NULL);
|
||||
if (gm) {
|
||||
tn = gmtime(&t);
|
||||
#if HAVE_TZSET
|
||||
tzset();
|
||||
#if HAVE_TM_ZONE
|
||||
tzset();
|
||||
#endif
|
||||
tn = localtime(&t);
|
||||
if (gm) {
|
||||
#if HAVE_TM_GMTOFF
|
||||
gmadjust=(tn->tm_gmtoff)/3600;
|
||||
#else
|
||||
gmadjust=timezone/3600;
|
||||
#endif
|
||||
#endif
|
||||
} else {
|
||||
tn = localtime(&t);
|
||||
}
|
||||
memcpy(&ta,tn,sizeof(struct tm));
|
||||
ta.tm_isdst = -1;
|
||||
|
Loading…
Reference in New Issue
Block a user