Index: php/ext/date/php_date.c =================================================================== --- php.orig/ext/date/php_date.c +++ php/ext/date/php_date.c @@ -987,7 +987,11 @@ static char* guess_timezone(const timeli the_time = time(NULL); ta = php_localtime_r(&the_time, &tmbuf); if (ta) { +#ifdef HAVE_TM_GMTOFF tzid = timelib_timezone_id_from_abbr(ta->tm_zone, ta->tm_gmtoff, ta->tm_isdst); +#else + tzid = timelib_timezone_id_from_abbr("utc", 0, ta->tm_isdst); +#endif } if (! tzid) { tzid = "UTC";